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

opacityChanged is not called on child items of QuickItem

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P4: Low
    • None
    • 6.4.2, 6.5.0
    • Quick: Other
    • None
    • Linux/X11, Windows

    Description

      https://doc.qt.io/qt-6/qquickitem.html#opacity-prop specifies that opacity is propagated to child items, but opacityChanged is not triggered for child items so it is impossible to react to an opacitychange in child items.

      You might want to do something in the child when opacity changed. This is impossible now since only the parent gets the message that the opacity changed.

       

      1. Unpack 7zip
      2. Go to QtBugReproducer
      3. cd build
      4. cmake.exe -A x64 -T v143 ..
      5. start devenv.exe QtQMLGraphicsItems.sln
      6. build project
      7. call %QT_ROOT_64%\bin\windeployqt.exe --qmldir . build\Debug\QtQMLGraphicsItems.exe (from the source directory)
      8. Start the executable
      9. Use button to change opacity
      10. Observe console ouptut
      11. Change line 31 in main.qml
      12. Rebuild
      13. Start executable
      14. Use button to change opacity
      15. Observe console output

       

      Expected:

            9) Both Rectancle 1 and 2 should print that opacity changed

           15) Both Rectangle 1 and 2 should print that opacity changed

      Observed

            9) Only Rectangle 1 prints that opacity changed

           15) Both Rectangle 1 and  2 should print that opacity changed (but the code change in (11) should not have been needed.

      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
            alfgrini Alf Grini
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes