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

QToolButton weird behavior when setStyleSheet.

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P2: Important P2: Important
    • 6.3
    • 6.2.3, 6.3.0
    • None
    • 1c338e6d07 (qt/qtbase/dev) 9d41bd4312 (qt/qtbase/dev)

      QToolButton's style will go  out of control ,if invoke method setStyleSheet, even if the stylesheet has nothing to do with the QToolButton.

       

       

      expected looks

       

       setStyleSheet with any non empty string will trigger this weird behavior.

        setStyleSheet(QString("\r\n\r\n"));
      

      btw, run with Qt5.15.2 is ok.

        1. image-2022-03-19-22-00-35-437.png
          13 kB
          yifang xiao
        2. image-2022-03-19-22-01-14-840.png
          1 kB
          yifang xiao
        3. tabicon.7z
          6 kB
          yifang xiao
        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
            xiaoyifang yifang xiao
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes