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

Editable QComboBox and QLineEdit misaligned in QGridLayout on macOS

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: P3: Somewhat important P3: Somewhat important
    • None
    • 5.12.3
    • None
    • macOS

      When creating a QGridLayout on macOS that contains a few QLabel, an editable QComboBox, and an editable QLineEdit, the two input fields are not correctly aligned to each other. A test case project is attached to further clarify the issue. The test case contains four input fields to help seeing the misalignment.

      This screenshot was taken from the app created by compiling the test case project. A horizontal misalignment between the two fields is already visible.

      This second screenshot shows a zoom in on the two input fields, with rulers that help clarifying the misalignment.

      Finally, the expected behavior is shown in this third screenshot, captured from macOS System Preferences->Network->Advanced->WINS. The screenshots contains exactly the same input elements as the test case, and it can be seen that they are aligned correctly in the native interface.

      This bug does not occur on other platforms. The same test case produces correctly aligned input fields on Windows and Linux.

        1. app.png
          app.png
          14 kB
        2. main.cpp
          1 kB
        3. native.png
          native.png
          10 kB
        4. test.pro
          0.1 kB
        5. zoom.png
          zoom.png
          18 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
            alby128 Alberto Sottile
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:

                There are no open Gerrit changes