Reputation: 335
I am implementing stackview in my application.
SwipeView {
id: swipeView
anchors.fill: parent
currentIndex: showfooter.currentIndex
DashboardListView{
id:dashboard
}
Settings{
id:setting
}
Cart{
id:cart
}
}
StackView {
id: stackView
initialItem: Pane {
id: pane
}
}
When i am loading some other screen(like SightDescription.qml) from DashboardListView using push method and cliking somewhere on that screen its calling slots for DashboardListView. DashboardListView Screen controls are getting onclick signal. Is there any setting related to stack view that I need to do, I read stackview's documentation but did not find anything to restrict this behavior.
Upvotes: 0
Views: 523
Reputation: 13691
It seems like the Pane
is usually intercepting the mouse events, so the lower Item
s cannot receive them.
When you push the new item on the StackView
the Pane
becomes visible: false
and therefore does not care for input anymore. If the new Item
does not handle the mouse events, they will propagate to the lower Item
.
To prevent that, you have various options:
Item
s pushed on the StackView
will handle mouse events, e.g. by making a Pane
or a MouseArea
the root item.MouseArea
directly below the StackView
that is only enabled when there are Item
s on the StackView
EventFilter
s in C++ e.t.c. but I think 1 and 2 should be suffice and be easy to implement.Upvotes: 1