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

QPushButton checked state stylesheet does not apply font styles

XMLWordPrintable

    • 4.8: 65656e03896d12c6dbc37a2ae7d30ec257c26092 5.3: 9ad768fd1999780df18551151b9d9fa9c354131c

      When I define a style sheet that modifies the font style in checked state (but also in other states) it does not display the text in the selected style.
      I have defined a style that tries to draw the text in bold when the button is in checked state.
      QPushButton:checked

      { font-weight: bold }

      I have tried various style sheets e.g. font: bold or font: 30px
      Setting the color to some other value works, e.g. color: red

      Attached an example application that shows the problem. When clicking on the checkable button, the text becomes red, but not bold.
      Setting another button to bold works, just not in the checked state.

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

            mitch_curtis Mitch Curtis
            rhdv Robert de Vries
            Votes:
            13 Vote for this issue
            Watchers:
            11 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes