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

QPushButton::setMenu() causes text to lose center-alignment on macOS

    XMLWordPrintable

Details

    • macOS

    Description

      Code

      m_addButton = new QPushButton(ToolChainOptionsPage::tr("Add"), this);
      auto addMenu = new QMenu;
      // ...
      m_addButton->setMenu(addMenu);
      

      Full code at https://github.com/qt-creator/qt-creator/blob/v9.0.0-beta1/src/plugins/projectexplorer/toolchainoptionspage.cpp#L176-L194

       

      Outcome
      See attached screenshots. The text is centered on Windows but not on macOS.

      Attachments

        1. qtc-compilers-macos.png
          133 kB
          Sze Howe Koh
        2. qtc-compilers-win.png
          28 kB
          Sze Howe Koh

        Issue Links

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

          Activity

            People

              axelspoerl Axel Spoerl
              skoh-qt Sze Howe Koh
              Votes:
              1 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 1 hour
                  1h

                  Gerrit Reviews

                    There are no open Gerrit changes