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

Multiple call of setStyleSheet() cause no effect on child widgets inside QTabWidget/QStackedWidget

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: P2: Important P2: Important
    • None
    • 5.9.5
    • Widgets: Style Sheets
    • None
    • Ubuntu 18.04.1 LTS
    • Linux/X11

      Multiple call of setStyleSheet() cause no effect on children and grand-children widgets inside the QTabWidget/QStackedWidget
      I made this simple example to simulate this BUG:

      MainWindow::MainWindow(QWidget *parent) :
          QMainWindow(parent),
          ui(new Ui::MainWindow)
      {
          ui->setupUi(this);
          this->setStyleSheet("color:blue;");
          this->setStyleSheet("color:red;");
      }
      
      

      Result can be seen on the screenshot bellow. For the first time, all children and grand-children widgets texts get updated to the blue, but for the second time only direct children widgets are set to the red.

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

            qt.team.quick.subscriptions Qt Quick and Widgets Team
            honzik1 Jan Hetych
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:

                There are no open Gerrit changes