diff options
-rw-r--r-- | examples/datavisualization/qmllegend/qml/qmllegend/LegendItem.qml | 4 | ||||
-rw-r--r-- | tests/manual/qmlvolume/qml/qmlvolume/main.qml | 25 |
2 files changed, 10 insertions, 19 deletions
diff --git a/examples/datavisualization/qmllegend/qml/qmllegend/LegendItem.qml b/examples/datavisualization/qmllegend/qml/qmllegend/LegendItem.qml index 5d63bde2..714b1e78 100644 --- a/examples/datavisualization/qmllegend/qml/qmllegend/LegendItem.qml +++ b/examples/datavisualization/qmllegend/qml/qmllegend/LegendItem.qml @@ -104,8 +104,8 @@ Rectangle { //! [4] Connections { target: series - onSelectedBarChanged: { - if (position != series.invalidSelectionPosition) { + function onSelectedBarChanged(position) { + if (position !== series.invalidSelectionPosition) { previousSelection = position } } 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 { |