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

OSX: wrong button layout

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P3: Somewhat important
    • None
    • 5.9.2
    • Widgets: Layout
    • None
    • MacOS 10.12.6 with Qt 5.9.2
    • macOS

    Description

      From https://forum.qt.io/topic/83373/osx-wrong-button-layout:

      I am creating a window with several buttons with a layout in rows and columns, some buttons spawning multiple columns. A simple version of this problem using 2 buttons in the top row, and one in the bottom row is attached as a minimal example.

      This creates 3 windows where I try different layouts and options. On Linux, all three variations create an identical layout (as it should):

      On OSX with Qt 5.9.2 though, only the GridLayout creates the correct layout:

      When using the BoxLayout-version the "Left" and "Right" buttons have too much space around them and are not vertically aligned with the "Full" button.

      Others have suggested to use the Qt::WA_LayoutUsesWidgetRect settings, but this only makes things worse. While it fixes the alignment problem, there is even more space around all buttons.

      Some will probably say, why not just using the first version with the GridLayout? The problem is that it is not always possible to put everything into a GridLayout, and it makes the software design unnecessary difficult.

       

      Attachments

        1. buttons.cc
          2 kB
        2. buttons.pro
          0.1 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
            brktim Steffen Gutmann
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes