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

QToolBar incorrect display on Windows 11

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P2: Important
    • None
    • 6.8
    • Widgets: Styles
    • Windows

    Description

      QToolBar buttons when checked have no difference with the ones that are not (see screenshots).

      Code:

      int main(int argc, char* argv[])
      {
          QApplication a(argc, argv);
          QMainWindow mw;
          auto tb = new QToolBar;
          mw.addToolBar(tb);
          auto a1 = new QAction("Act 1");
          auto a2 = new QAction("Act 2");
          tb->addAction(a1);
          tb->addAction(a2);
          a1->setCheckable(true);
          a2->setCheckable(true);
          a2->setChecked(true);
          auto menu = mw.menuBar()->addMenu("Menu");
          menu->addAction(a1);
          menu->addAction(a2);
          auto centralWidget = new QWidget;
          auto lay = new QHBoxLayout(centralWidget);
          auto pb = new QPushButton("Push me!");
          pb->setCheckable(true);
          lay->addWidget(pb);
          lay->addWidget(new QCheckBox("CheckBox"));
          lay->addWidget(new QRadioButton("Radio Button"));
          mw.setCentralWidget(centralWidget);
          mw.show();
          return app.exec();
      }
      

      Attachments

        1. default.png
          3 kB
          Ilya Parniuk
        2. fusion.png
          5 kB
          Ilya Parniuk

        Issue Links

          For Gerrit Dashboard: QTBUG-129439
          # Subject Branch Project Status CR V

          Activity

            People

              chehrlic Christian Ehrlicher
              crystalbit Ilya Parniuk
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:

                Gerrit Reviews

                  There is 1 open Gerrit change