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

Attached style properties not propagating when popupType is set to popup window

    XMLWordPrintable

Details

    Description

      When setting the popup type to popup window, the material style properties is not completely working (tested using the material style):

      1. Menu does receive the propagation from its parent's background and primary/accent color.
      2. textSelection color is not propagated.

      When adding the popup window popup type to the test data and running tst_material.cpp, the following errors occur test_output.txt

      Note: The issue also occurs in other styles that propagate attached properties.

      import QtQuick.Window
      import QtQuick.Controls
      import QtQuick.Layouts
      import QtQuick.Controls.Material
      
      ApplicationWindow {
          id: window
          width: 200
          height: 200
          visible: true
          Material.foreground: togglePal ? Material.Purple : Material.Blue
          property bool togglePal: true    
          Button {
              text: "Open"
              onClicked: popup.open()
          }    
          Popup {
              id: popup
              width: parent.width
              height: parent.height
              popupType: Popup.Window
              Button {
                  id: button
                  text: "Toggle palette"
                  onClicked: { window.togglePal = !window.togglePal }
              }
              Label { anchors.top: button.bottom; text: qsTr("Label control") }
          }
      }

       

       

      Attachments

        For Gerrit Dashboard: QTBUG-126713
        # Subject Branch Project Status CR V

        Activity

          People

            edcooke Ed Cooke
            edcooke Ed Cooke
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes