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

QColorDialog: Unable to pick color when using hover in stylesheet

    XMLWordPrintable

Details

    • Windows

    Description

       

      When using a stylesheet that modifies hover, I'm unable to select a color because the color is changing when the mouse hovers over a color. When disabling the setStylesSheet call, setting the color applies when using the left mouse button and not when hovering. 

      Not a fix, but just something I noticed: reverting the changes in https://github.com/qt/qtbase/commit/62f86b9b7ab3421c7a74c4c05a186847c76bfb28 (most specifically removing the line 'embeddedWidget(w)->setMouseTracking(true)' in src/widgets/styles/qstylesheetstyle.cpp) seems to address the issue as well. 

      Issue does not happen on 5.13.1

      #include <QApplication>
      #include <QColorDialog>
      
      int main(int argc, char **argv)
      {
          QApplication app(argc, argv);
          app.setStyleSheet("QWidget:hover { color: #000000; }");
      
          QColorDialog::getColor();
      
          return app.exec();
      } 

       

       

      Attachments

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

        Activity

          People

            qt.team.quick.subscriptions Qt Quick and Widgets Team
            mcdongle Mike Baran
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes