From bca40cd25d71ae5fb322e0248d4f806b885d44de Mon Sep 17 00:00:00 2001 From: Tomi Korpipaa Date: Thu, 12 Jan 2023 10:19:38 +0200 Subject: Fix qmlbars example for portrait mode MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Pick-to: 6.2 6.4 6.5 Fixes: QTBUG-110038 Change-Id: I008827e96c7a090568689652a81e32e0bf80f67c Reviewed-by: Amr Elsayed Reviewed-by: Kwanghyo Park Reviewed-by: Tomi Korpipää --- examples/datavisualization/qmlbars/qml/qmlbars/main.qml | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) (limited to 'examples') diff --git a/examples/datavisualization/qmlbars/qml/qmlbars/main.qml b/examples/datavisualization/qmlbars/qml/qmlbars/main.qml index 321a5ea9..745104f0 100644 --- a/examples/datavisualization/qmlbars/qml/qmlbars/main.qml +++ b/examples/datavisualization/qmlbars/qml/qmlbars/main.qml @@ -37,7 +37,7 @@ Item { // Set tableView current row to selected bar var rowRole = series.dataProxy.rowLabels[position.x]; var colRole - if (barGraph.columnAxis === graphAxes.total) + if (barGraph.columnAxis == graphAxes.total) colRole = "01"; else colRole = series.dataProxy.columnLabels[position.y]; @@ -57,13 +57,12 @@ Item { Item { id: dataView - anchors.right: mainview.right; + anchors.right: mainview.right anchors.bottom: mainview.bottom Bars3D { id: barGraph - width: dataView.width - height: dataView.height + anchors.fill: parent shadowQuality: AbstractGraph3D.ShadowQualityMedium selectionMode: AbstractGraph3D.SelectionItem theme: Theme3D { @@ -150,12 +149,9 @@ Item { } } - - ColumnLayout { id: tableViewLayout - anchors.top: parent.top anchors.left: parent.left @@ -169,7 +165,6 @@ Item { padding: 3 text: header.columnNames[index] } - } TableView { @@ -189,7 +184,6 @@ Item { rows: graphData.modelAsJsArray } - delegate: Rectangle { implicitHeight: 30 implicitWidth: tableView.width / 3 @@ -219,7 +213,6 @@ Item { return display } } - } } } @@ -232,7 +225,7 @@ Item { var matches = pattern.exec(timestamp) var rowIndex = modelProxy.rowCategoryIndex(matches[1]) var colIndex - if (barGraph.columnAxis === graphAxes.total) + if (barGraph.columnAxis == graphAxes.total) colIndex = 0 // Just one column when showing yearly totals else colIndex = modelProxy.columnCategoryIndex(matches[2]) @@ -382,7 +375,7 @@ Item { name: "portrait" PropertyChanges { target: dataView - width: mainview.height / 4 * 3 + width: mainview.width height: mainview.width } PropertyChanges { -- cgit v1.2.3