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

QGraphicsEffects fails to apply to child widgets in some cases

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: P4: Low P4: Low
    • None
    • 5.2.1
    • None
    • Windows 7, qtbase/stable

      Install a QGraphicsEffect on a widget that has a child. The effect is applied to the whole subtree. During subsequent updates however the children tend to lose the effect, meaning they are drawn without the effect applied.

      The attached example creates a QWidget with a QPushButton as its child. An opacity effect is applied to the QWidget. Running it on Windows 7 shows the effect applied properly in the beginning.

      However, hovering the mouse over the button makes the effect disappear: the hovered state is drawn with the effect. Moving the mouse away does not restore the effect either, the button's normal state is now drawn without any effect.

      Update: The behaviour is even more bizarre on Mac: By clicking the button the opacity gradually increases. Just change the effect opacity to 0.1 in the example app and click the button a few times.

        1. eff.zip
          1 kB
          Laszlo Agocs
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            peppe Giuseppe D'Angelo
            lagocs Laszlo Agocs
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:

                There are no open Gerrit changes