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

Editable QComboBox and QLineEdit misaligned in QGridLayout on macOS

    XMLWordPrintable

Details

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

    Description

      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.

      Attachments

        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.

        Activity

          People

            qt.team.quick.subscriptions Qt Quick and Widgets Team
            alby128 Alberto Sottile
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes