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

Cascading Stylesheet not updated (Regression from Qt 5.11)

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Not Evaluated Not Evaluated
    • None
    • 5.12.5
    • Widgets: Style Sheets
    • None
    • Windows

      Setting stylesheet on a widget for the second time (after it is showed) don't update children widget stylesheets.

      From a simple standard QWidget app projet:

          QApplication a(argc, argv);
          MainWindow w;
          w.setStyleSheet("QWidget { background-color: rgb(200, 100, 100) }");
          w.show();
          w.setStyleSheet("QWidget { background-color: rgb(100, 100, 200) }");
          return a.exec();
      

       

      Expected result (works with Qt 5.11.1):

       

      Result with Qt 5.12.5:

       

      Complete small project in attachment.

       

       

        1. StylesheetBugExpected.PNG
          3 kB
          Stéphane Fabry
        2. StylesheetBugQt5.12.PNG
          3 kB
          Stéphane Fabry
        3. stylesheetBug.zip
          2 kB
          Stéphane Fabry
        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
            ness522 Stéphane Fabry
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes