summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorTuomo Pelkonen <tuomo.pelkonen@gmail.com>2021-02-15 12:07:48 +0200
committerTomi Korpipää <tomi.korpipaa@qt.io>2021-02-26 05:00:30 +0000
commit9cb0e5714182df7f7d6b4fb291ffb83b614750d5 (patch)
tree201741cf97c0fde33769519097e53214506efb82 /tests
parent8461cda03dcbaf70d182656e245f1e636b580e83 (diff)
Fix layout and signal handling in QML apps
Pick-to: 6.1 Task-number: QTBUG-90664 Change-Id: I181a3b3b2a1801665a0d876a837054aa10425c0d Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
Diffstat (limited to 'tests')
-rw-r--r--tests/manual/qmlvolume/qml/qmlvolume/main.qml25
1 files changed, 8 insertions, 17 deletions
diff --git a/tests/manual/qmlvolume/qml/qmlvolume/main.qml b/tests/manual/qmlvolume/qml/qmlvolume/main.qml
index ccbac009..0ce82a12 100644
--- a/tests/manual/qmlvolume/qml/qmlvolume/main.qml
+++ b/tests/manual/qmlvolume/qml/qmlvolume/main.qml
@@ -50,15 +50,7 @@ Item {
width: dataView.width
height: dataView.height
orthoProjection: true
- //measureFps: true
-
- onCurrentFpsChanged: {
- if (fps > 10)
- fpsText.text = "FPS: " + Math.round(surfaceGraph.currentFps)
- else
- fpsText.text = "FPS: " + Math.round(surfaceGraph.currentFps * 10.0) / 10.0
- }
-
+ measureFps : false
Surface3DSeries {
id: surfaceSeries
drawMode: Surface3DSeries.DrawSurface;
@@ -92,12 +84,9 @@ Item {
anchors.fill: parent
RowLayout {
id: sliderLayout
- anchors.top: parent.top
- Layout.fillHeight: true
- Layout.fillWidth: true
- Layout.minimumHeight: 150
+ Layout.fillHeight: false
spacing: 0
-
+ visible: surfaceGraph.measureFps
Rectangle {
Layout.fillHeight: true
Layout.fillWidth: true
@@ -116,16 +105,18 @@ Item {
anchors.fill: parent
verticalAlignment: Text.AlignVCenter
horizontalAlignment: Text.AlignHCenter
+ text: {
+ return "FPS: " + surfaceGraph.currentFps > 10
+ ? Math.round(surfaceGraph.currentFps)
+ : Math.round(surfaceGraph.currentFps * 10.0) / 10.0
+ }
}
}
}
RowLayout {
id: buttonLayout
- Layout.fillHeight: true
- Layout.fillWidth: true
Layout.minimumHeight: 50
- anchors.bottom: parent.bottom
spacing: 0
Button {