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

QColorDialog: WA_Hover breaks color and luminance picker

    XMLWordPrintable

Details

    • a2ec43b8e (dev), aa0f395fd (6.6), 5ed7eb0d7 (tqtc/lts-6.2), 1a5612b9e (6.5)

    Description

      It's a side effect of this patch:
      https://codereview.qt-project.org/c/qt/qtbase/+/318526
      that solves this bug:
      https://bugreports.qt.io/browse/QTBUG-87706

      QColorDialog behavior is broken if its stylesheet contains 'hover' (even if it's a completely dummy sheet without doing anything). When mouse is hovering above color panel, color changes when mouse moves even without clicking. A minimal reproducer:

      int main(int argc, char *argv[])
      {
          QApplication app(argc, argv);
      
          QColorDialog* cDiag = new QColorDialog;
          QString* str = new QString("QWidget:item:hover"
                                      "{"
                                      "}");
          cDiag->setStyleSheet(*str);
          cDiag->show();
      
          return app.exec();
      }
      

      So if the patch solves QPushButton issue, then probably it is better to limit the scope to QPushButton only. A possible patch is uploaded. What is the possibility of it being merged into further release and/or backporting to old versions?

      Attachments

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

        Activity

          People

            axelspoerl Axel Spoerl
            luqiaochen Luqiao Chen
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: