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

QToolBar and QTabBar in document mode combined with unified title and toolbar rendered incorrectly when QMainWIndow contains QWebEngineView

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P3: Somewhat important P3: Somewhat important
    • None
    • 5.8.0
    • None
    • macOS Sierra

      When these conditions are met then toolbars and selected tab handle of tab bar are painted in black when placed in top toolbar area.

      Minimal test case:

      test.pro

      QT       = core gui widgets webenginewidgets
      TARGET   = qtwebengine_macos_unifiedtitleandtoolbar
      TEMPLATE = app
      SOURCES  += main.cpp
      

      main.cpp

      #include <QtWidgets/QApplication>
      #include <QtWidgets/QMainWindow>
      #include <QtWidgets/QTabBar>
      #include <QtWidgets/QToolBar>
      #include <QtWebEngineWidgets/QWebEngineView>
      
      class MainWindow : public QMainWindow
      {
      public:
      	MainWindow() : QMainWindow()
      {
      	QTabBar *tabBar(new QTabBar(this));
      	tabBar->setDocumentMode(true);
      	tabBar->addTab("Tab 1");
      	tabBar->addTab("Tab 2");
      	tabBar->addTab("Tab 3");
      
      	QToolBar *toolBar1(new QToolBar("Toolbar 1", this));
      	toolBar1->setMovable(true);
      	toolBar1->addAction("Action 1");
      	toolBar1->addSeparator();
      	toolBar1->addAction("Action 2");
      
      	QToolBar *toolBar2(new QToolBar("Toolbar 2", this));
      	toolBar2->addWidget(tabBar);
      
      	addToolBar(Qt::TopToolBarArea, toolBar1);
      	addToolBarBreak(Qt::TopToolBarArea);
      	addToolBar(Qt::TopToolBarArea, toolBar2);
      	setUnifiedTitleAndToolBarOnMac(true);
      	setCentralWidget(new QWebEngineView(this));
      }
      
      };
      
      int main(int argc, char *argv[])
      {
      	QApplication application(argc, argv);
      	MainWindow window;
      	window.show();
      
      	return application.exec();
      }
      

      Original bug report:
      https://github.com/OtterBrowser/otter-browser/issues/1330

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

            mmutz Marc Mutz
            emdek MichaƂ Dutkiewicz
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes