[Development] Problem with QtQuick.Controls, style.panel <-> custom Control children stack order
Tomasz Olszak
olszak.tomasz at gmail.com
Thu May 16 15:24:37 CEST 2013
I have encountered some problem related to
Control.qml/AbstractCheckable.qml internals.
Example case:
CheckBoxStyle has indicator which can interact with user (has mouse area).
Current situation:
We are not able to handle such case, even by reimplementing panel because:
* panelLoader(from Control.qml) and MouseArea (from AbstractCheckable) are
on the same hierarchy level
* MouseArea(from AbstractCheckable) is created after panelLoader - is
higher on stack because z's properties are the same
* MouseArea (from AbstractCheckable) covers all other MouseArea's from
style.panel
I have analysed this case and don't see any obvious solution. Below is some
informal draft of object visibility stack. We see that MouseArea from
AbstractCheckable covers Items created in CheckBoxStyle (is it a bug? )
Control {
id:root
Loader {
id: panelLoaded
CheckBoxStyle {
id:checkBoxStyle
Panel {
}
}
}
AbstractCheckable {
MouseArea {
}
CheckBox {
UserCheckBox {
//some user properties and items
}
}
}
}
I think hierarchy should look like:
Control {
id:root
AbstractCheckable {
MouseArea {
}
CheckBox {
Loader {
id: panelLoaded
CheckBoxStyle {
id:checkBoxStyle
Panel {
}
}
}
UserCheckBox {
//some user properties and items
}
}
}
}
So content of CheckBoxStyle should be above all default mechanisms and
below user items in stack order.
What do you think?
--
Pozdrawiam/Regards,
Tomasz Olszak
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/development/attachments/20130516/902a8b62/attachment.html>
More information about the Development
mailing list