From 6c2aec18ed7f043c17b09c939b9bc521def37aa5 Mon Sep 17 00:00:00 2001 From: Tuomo Pelkonen Date: Thu, 14 Jan 2021 10:49:40 +0200 Subject: Fix most of the QML example applications MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Most of the QML examples work now as supposed to. Qmlbars still needs fixing and is not included in this patch. Task-number: QTBUG-89298 Change-Id: Ic8bc6511cdb00dd3db0a181b7a31b3bbc39f0556 Reviewed-by: Tomi Korpipää --- .../qmloscilloscope/qml/qmloscilloscope/main.qml | 28 ++++++++++------------ 1 file changed, 12 insertions(+), 16 deletions(-) (limited to 'examples/datavisualization/qmloscilloscope/qml/qmloscilloscope/main.qml') diff --git a/examples/datavisualization/qmloscilloscope/qml/qmloscilloscope/main.qml b/examples/datavisualization/qmloscilloscope/qml/qmloscilloscope/main.qml index c6a64cc2..dfb67424 100644 --- a/examples/datavisualization/qmloscilloscope/qml/qmloscilloscope/main.qml +++ b/examples/datavisualization/qmloscilloscope/qml/qmloscilloscope/main.qml @@ -27,10 +27,10 @@ ** ****************************************************************************/ -import QtQuick 2.1 -import QtQuick.Layouts 1.0 -import QtQuick.Controls 1.0 -import QtDataVisualization 1.1 +import QtQuick +import QtQuick.Layouts +import QtQuick.Controls +import QtDataVisualization import "." Item { @@ -130,7 +130,6 @@ Item { anchors.fill: parent RowLayout { id: sliderLayout - anchors.top: parent.top Layout.fillHeight: true Layout.fillWidth: true Layout.minimumHeight: flatShadingToggle.height @@ -157,11 +156,10 @@ Item { Layout.fillWidth: true Layout.alignment: Qt.AlignHCenter | Qt.AlignVCenter Layout.minimumWidth: 80 - minimumValue: mainView.sampleCache * 2 - maximumValue: minimumValue * 10 + from: mainView.sampleCache * 2 + to: from * 10 stepSize: mainView.sampleCache - updateValueWhileDragging: false - Component.onCompleted: value = minimumValue * 2 + Component.onCompleted: value = from * 2 } Rectangle { @@ -203,10 +201,9 @@ Item { Layout.fillWidth: true Layout.alignment: Qt.AlignHCenter | Qt.AlignVCenter Layout.minimumWidth: 80 - minimumValue: 2 - maximumValue: 60 + from: 2 + to: 60 stepSize: 2 - updateValueWhileDragging: true value: 30 } @@ -272,10 +269,9 @@ Item { Layout.fillHeight: true Layout.fillWidth: true Layout.minimumHeight: flatShadingToggle.height - anchors.bottom: parent.bottom spacing: 0 - NewButton { + Button { id: flatShadingToggle Layout.fillHeight: true Layout.fillWidth: true @@ -294,7 +290,7 @@ Item { } } - NewButton { + Button { id: surfaceGridToggle Layout.fillHeight: true Layout.fillWidth: true @@ -312,7 +308,7 @@ Item { } } - NewButton { + Button { id: exitButton Layout.fillHeight: true Layout.fillWidth: true -- cgit v1.2.3