Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-111349

QPushButton with style sheet: Button text not fully visible

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P3: Somewhat important
    • None
    • 5.15.11
    • Widgets: Styles
    • None
    • Windows 10, Qt 5.15.11, Qt Creator 4.12.1
    • Windows

    Description

      We use a global style sheet to style the whole application. On Windows 10 some pixels are clipped away from button texts if they have borders. This effect does not occur on Linux.

      Have a look at the attached CutOffButtonText.ui.

      This .ui file contains two QPushButtons, "Save" and "Cancel", and a QDialogButtonBox also with buttons with buttons "Save" and "Cancel".

      The style sheet set on the containing widget sets a 2 px outset border on the focus button and a 2px dashed border on the default button.

      To reproduce simply load this .ui file in Qt Designer or Qt Creator and choose "Preview...". Then click on e.g. the first "Cancel" button to change the focus.

      On Windows 10 the result looks like ButtonTexts_Windows.png: There are some pixels missing at the beginning of the button text of both the default button and the focus button.

      (If you do the same on Linux however then the texts are correct. See ButtonTexts_Linux.png)

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            tpochep Timur Pocheptsov
            cyril Harald Prasser
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes