diff options
author | Tuomo Pelkonen <tuomo.pelkonen@gmail.com> | 2021-02-15 12:07:48 +0200 |
---|---|---|
committer | Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> | 2021-02-26 05:21:45 +0000 |
commit | 751f755213aedcfe7c36aeebf1e2ae6a010d0bde (patch) | |
tree | e94a426deb815692b01876203558b3ca73968ee8 /tests | |
parent | 95ebd340b9ddce6ee3abc2043e103647a73ede5b (diff) |
Fix layout and signal handling in QML apps
Task-number: QTBUG-90664
Change-Id: I181a3b3b2a1801665a0d876a837054aa10425c0d
Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
(cherry picked from commit 9cb0e5714182df7f7d6b4fb291ffb83b614750d5)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/manual/qmlvolume/qml/qmlvolume/main.qml | 25 |
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 { |