summaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
authorLaszlo Agocs <laszlo.agocs@qt.io>2018-08-14 15:54:47 +0200
committerLaszlo Agocs <laszlo.agocs@qt.io>2018-08-14 19:51:52 +0000
commit3e866306c34cc0f00bf437fab9b90a5f4ad21a1a (patch)
treeada609a299787669c43abf4abe89f31404d770a8 /examples
parentf452d7bb847388325a3f6830eb72c68bbd1a1f1c (diff)
Move layersinquick example over to Quick-based profileui
So that it now works on both normal and separatedViews mode. Change-Id: I220e9e221b6cc8702fd83b02031a9eb7593e7791 Reviewed-by: Christian Stromme <christian.stromme@qt.io>
Diffstat (limited to 'examples')
-rw-r--r--examples/3dstudioruntime2/layersinquick/main.qml21
1 files changed, 20 insertions, 1 deletions
diff --git a/examples/3dstudioruntime2/layersinquick/main.qml b/examples/3dstudioruntime2/layersinquick/main.qml
index 551360b..c37de69 100644
--- a/examples/3dstudioruntime2/layersinquick/main.qml
+++ b/examples/3dstudioruntime2/layersinquick/main.qml
@@ -56,10 +56,19 @@ Rectangle {
id: root
color: "lightGray"
+ Button {
+ id: profBtn
+ text: "Profile UI"
+ // we use a Studio3DProfiler item so toggle that instead of pres.profileUiVisible
+ onClicked: quickBasedProfileUI.visible = !quickBasedProfileUI.visible
+ focusPolicy: Qt.NoFocus
+ }
+
CheckBox {
id: shaderEffectCb
text: "ShaderEffect"
checked: true
+ anchors.left: profBtn.right
focusPolicy: Qt.NoFocus
}
@@ -75,7 +84,6 @@ Rectangle {
id: s3d
anchors.fill: parent
anchors.margins: 40
- focus: true
Presentation {
id: pres
@@ -190,4 +198,15 @@ Rectangle {
font.pointSize: 16
}
}
+
+ // This example uses Qt Quick-based debug views because rendering them with
+ // Qt 3D is not feasible anymore in the separated views model (as Qt 3D is
+ // not responsible for the final composed image).
+ Studio3DProfiler {
+ id: quickBasedProfileUI
+ visible: false
+ focus: true
+ anchors.fill: parent
+ anchors.margins: 40
+ }
}