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

Vertical Alignment of QPushButton

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: P2: Important P2: Important
    • None
    • 6.9.3
    • GUI: Look'n'Feel
    • None
    • macOS 26.0.1, M3 iMac
    • macOS

      I noticed that QPushButtons are rendered about two pixels lower than other widgets, like QComboBox or QXCheckBox. If these widgets are put next to each other, this is noticeable as along with the outside of the widget, the text baseline (which is appears correct in relation to the widget boundary) is then also shifted by two pixels. This is definitely noticeable in the application.

      Attached are a source code that produces the bug, and a (upscaled) screenshot of its output that shows the offset (lines added).

      I believe this problem also occurred in older versions of Qt, but it now bothers me in my application so much that I felt like I needed to open this bug report, so I don't believe that it's a macOS26 compatibility issue.

        1. Bugs.pro
          0.2 kB
        2. main.cpp
          0.8 kB
        3. Screenshot.jpg
          Screenshot.jpg
          104 kB
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            qt.team.quick.subscriptions Qt Quick and Widgets Team
            chrisv Chris von Toerne
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:

                There are no open Gerrit changes