systemdialogs example bug fix: don't allow clicking through tabs

For example on Font Dialogs tab of
examples/quick/dialogs/systemdialogs/systemdialogs.qml
it was possible to open the color dialog by clicking slightly below
the open button, because the color dialog tab was behind the
current one.

Change-Id: If9917e2baef7cfd49a0d01acd73ffa69dfcee088
Reviewed-by: Liang Qi <liang.qi@digia.com>
This commit is contained in:
Shawn Rutledge 2013-09-11 14:21:20 +02:00 committed by The Qt Project
parent 9c82c105a1
commit ee6cc22ebd
1 changed files with 3 additions and 1 deletions

View File

@ -56,8 +56,10 @@ Item {
Component.onCompleted: setZOrders()
function setZOrders() {
for (var i = 0; i < stack.children.length; ++i)
for (var i = 0; i < stack.children.length; ++i) {
stack.children[i].z = (i == current ? 1 : 0)
stack.children[i].enabled = (i == current)
}
}
Row {