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

QQuickAttachedPropertyPropagator cannot propagate through popup and window

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Invalid
    • Icon: P2: Important P2: Important
    • None
    • 6.5.1
    • Quick: Controls 2
    • None
    • Windows
    • e4ba076e4 (dev), 3d7f38140 (6.5), 0822bdf6a (6.6)

      QQuickAttachedPropertyPropagator cannot propagate through popup and window, which is different from the behavior of palette(for example).

      It looks like that it works fine in the demo attachedstyleproperties, but when we move the custom Popup and the ApplicationWindow (defined in MyStyle) into an Item which is a child of the main ApplicationWindow,

      ApplicationWindow {
            ......
           color: _test.MyStyle.windowColor //avoid to set MyStyle.theme
           Item {
                  id: _test
              anchors.fill: parent
              MyStyle.theme: darkModeSwitch.checked ? MyStyle.Dark : MyStyle.Light //set here
                  ......
               Popup { ......
              ApplicationWindow { ......
          }
      } 

      the Popup and ApplicationWindow will fail to follow the MyStyle of their parent, while the two Openxxx buttons and labels can.

      There maybe a bug that propagated attached properties of Popup and ApplicationWindow will follow the value of the Popup and AppcationWindow's window, not their parent.

      AttachedParent of Popup's attached property is the Window's attached property, not their parent's

        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
            zijinshanren Li Zhengrong
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes