diff options
author | Tomi Korpipaa <tomi.korpipaa@qt.io> | 2023-01-12 10:19:38 +0200 |
---|---|---|
committer | Tomi Korpipaa <tomi.korpipaa@qt.io> | 2023-01-13 11:08:46 +0200 |
commit | bca40cd25d71ae5fb322e0248d4f806b885d44de (patch) | |
tree | 654c3ff3ab1453aa22d522bcc04ebb02a3c45563 /examples | |
parent | 42ea970aa4584e73e5e989bee5d1f1e58e133bed (diff) |
Fix qmlbars example for portrait mode
Pick-to: 6.2 6.4 6.5
Fixes: QTBUG-110038
Change-Id: I008827e96c7a090568689652a81e32e0bf80f67c
Reviewed-by: Amr Elsayed <amr.elsayed@qt.io>
Reviewed-by: Kwanghyo Park <kwanghyo.park@qt.io>
Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
Diffstat (limited to 'examples')
-rw-r--r-- | examples/datavisualization/qmlbars/qml/qmlbars/main.qml | 17 |
1 files changed, 5 insertions, 12 deletions
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 { |