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

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

XMLWordPrintable

    • macOS

      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.

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

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

              Created:
              Updated:
              Resolved:

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

                  There are no open Gerrit changes