aboutsummaryrefslogtreecommitdiffstats
path: root/examples/quick/shared
diff options
context:
space:
mode:
Diffstat (limited to 'examples/quick/shared')
-rw-r--r--examples/quick/shared/CheckBox.qml2
-rw-r--r--examples/quick/shared/LauncherList.qml11
-rw-r--r--examples/quick/shared/Slider.qml2
3 files changed, 8 insertions, 7 deletions
diff --git a/examples/quick/shared/CheckBox.qml b/examples/quick/shared/CheckBox.qml
index 7b1588d2d9..51b6aabc09 100644
--- a/examples/quick/shared/CheckBox.qml
+++ b/examples/quick/shared/CheckBox.qml
@@ -87,7 +87,7 @@ Item {
anchors.margins: frame.width / 5
fillMode: Image.PreserveAspectFit
smooth: true
- visible: checked
+ visible: root.checked
}
}
Text {
diff --git a/examples/quick/shared/LauncherList.qml b/examples/quick/shared/LauncherList.qml
index fe44cf3634..9859b5b635 100644
--- a/examples/quick/shared/LauncherList.qml
+++ b/examples/quick/shared/LauncherList.qml
@@ -51,6 +51,7 @@
import QtQuick 2.12
Rectangle {
+ id: root
property int activePageCount: 0
//model is a list of {"name":"somename", "url":"file:///some/url/mainfile.qml"}
@@ -74,7 +75,7 @@ Rectangle {
id: launcherList
clip: true
delegate: SimpleLauncherDelegate{
- onClicked: showExample(url)
+ onClicked: root.showExample(url)
}
model: ListModel {id:myModel}
anchors.fill: parent
@@ -116,7 +117,7 @@ Rectangle {
ParallelAnimation {
id: showAnim
ScriptAction {
- script: activePageCount++
+ script: root.activePageCount++
}
NumberAnimation {
target: launcherList
@@ -144,7 +145,7 @@ Rectangle {
id: exitAnim
ScriptAction {
- script: activePageCount--
+ script: root.activePageCount--
}
ParallelAnimation {
@@ -182,7 +183,7 @@ Rectangle {
visible: height > 0
anchors.bottom: parent.bottom
width: parent.width
- height: activePageCount > 0 ? 40 : 0
+ height: root.activePageCount > 0 ? 40 : 0
Behavior on height {
NumberAnimation {
@@ -222,7 +223,7 @@ Rectangle {
TapHandler {
id: tapHandler
- enabled: activePageCount > 0
+ enabled: root.activePageCount > 0
onTapped: {
pageContainer.children[pageContainer.children.length - 1].exit()
}
diff --git a/examples/quick/shared/Slider.qml b/examples/quick/shared/Slider.qml
index cdda86e39e..5b08034571 100644
--- a/examples/quick/shared/Slider.qml
+++ b/examples/quick/shared/Slider.qml
@@ -83,7 +83,7 @@ Item {
anchors.left: parent.left
anchors.leftMargin: 16
height: childrenRect.height
- width: Math.max(minLabelWidth, childrenRect.width)
+ width: Math.max(slider.minLabelWidth, childrenRect.width)
anchors.verticalCenter: parent.verticalCenter
Text {
text: slider.name + ":"