Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. PropagateComposedEvents to ComboBox not work
Forum Updated to NodeBB v4.3 + New Features

PropagateComposedEvents to ComboBox not work

Scheduled Pinned Locked Moved QML and Qt Quick
1 Posts 1 Posters 964 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D Offline
    D Offline
    dasun
    wrote on last edited by
    #1

    I know that documentation mentions propagateComposedEvents events works for MouseArea. But What If I want it to work for combo box or another Qt Quick Component? Is there any work around?

    Following sample code doesn't trigger Combo Box click event.
    @Rectangle{
    width: 800
    height: 600

        ComboBox {
            id: combo
            anchors.centerIn: parent
            model: ListModel{
                ListElement { text: "Banana"; color: "Yellow" }
                ListElement { text: "Apple"; color: "Green" }
                ListElement { text: "Coconut"; color: "Brown" }
            }
        }
    
        MouseArea{
            id:mouseArea
            anchors.fill: parent
            hoverEnabled: true
            propagateComposedEvents: true
            onContainsMouseChanged: {
                console.log("mouseArea containsMouse:" + mouseArea.containsMouse);
            }
        }
    }@
    
    1 Reply Last reply
    0

    • Login

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Get Qt Extensions
    • Unsolved