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

QLabel not rendering correctly in QToolbar | Mojave Darkmode

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: P1: Critical P1: Critical
    • 5.12.1
    • 5.12.0
    • GUI: Look'n'Feel
    • None
    • macOS
    • efb7400

      Rendering of a QLabel in Mojave Darkmode, first one is within a QToolbar, second one is without.

      minimal example:

      #include "mainwindow.h"
      #include <QtWidgets>
      #include <QVBoxLayout>
      #include <QToolBar>
      
      MainWindow::MainWindow(QWidget *parent)
          : QMainWindow(parent)
      {
          QWidget* main = new QWidget();
      
          setCentralWidget(main);
      
          QToolBar* toolbar = new QToolBar(this);
          toolbar->addWidget(new QLabel("Text"));
      
          QVBoxLayout *layout = new QVBoxLayout();
          layout->addWidget(toolbar);
          layout->addWidget(new QLabel("Text"));
      
          main->setLayout(layout);
      }
      
      MainWindow::~MainWindow()
      {
      
      }
      

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

            tpochep Timur Pocheptsov
            candyface Oliver Larsen
            Votes:
            2 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes