-
Bug
-
Resolution: Unresolved
-
P2: Important
-
None
-
6.8.4
When using the OpenGL backend in Qt 6.8.4, underlines drawn with the Segoe UI font are sometimes clipped or not fully displayed. This issue does not occur in Qt 6.5.10.
The issue seems related to a combination of screen scaling and font size. At certain scale factors, specific font sizes cause the underline to be partially missing or incorrectly rendered.
Steps to reproduce:
- Build and run the attached example project.
- Observe, the underline of the text is not fully displayed.
Workaround:
Modifying the implicit width/height calculation in QML controls helps mitigate the issue.
Original code:
implicitWidth: Math.max(Math.max(implicitBackgroundWidth + leftInset + rightInset, implicitContentWidth + leftPadding + rightPadding), minWidth()) implicitHeight: Math.max(Math.max(implicitBackgroundHeight + topInset + bottomInset, implicitContentHeight + topPadding + bottomPadding), minHeight())
Modified workaround:
implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset, implicitContentWidth + leftPadding + rightPadding) implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset, implicitContentHeight + topPadding + bottomPadding)