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

"color" not applied in qStyleSheet

    XMLWordPrintable

Details

    • Bug
    • Resolution: Invalid
    • Not Evaluated
    • None
    • 5.3.2
    • Widgets: Style Sheets
    • None

    Description

      When I set a stylesheet like this

      #settingsbutton {
      color: #f00;
      background-color: #0f0;
      }
      #settingsbutton:hover {
      color: #00f;
      }

      and try to draw something like this in the overridden paint member:

      // Draw a simple circle
      QPainter p1(&icon);
      p1.setRenderHint(QPainter::Antialiasing, true);
      p1.setPen(this->palette().brush(QPalette::Active, QPalette::WindowText).color());
      p1.setBrush(QBrush(this->palette().brush(QPalette::Active, QPalette::WindowText).color()));
      p1.drawEllipse(r);

      The foreground color is not used if I hover over the button

      Attachments

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

        Activity

          People

            Unassigned Unassigned
            manuelschneid3r Manuel Schneider
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes