diff options
author | Tomi Korpipaa <tomi.korpipaa@qt.io> | 2023-01-12 10:19:38 +0200 |
---|---|---|
committer | Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> | 2023-01-13 11:18:39 +0000 |
commit | 5a40f05aea68f7d5adc097c0d22f1d690ad464a2 (patch) | |
tree | 634e8fb4e861bd365ba88ecf6731a0aa8820fcce /examples/datavisualization/qmlbars | |
parent | a3282e45504dcf43bc9028bb4618231a629a9f9c (diff) |
Fix qmlbars example for portrait mode
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>
(cherry picked from commit bca40cd25d71ae5fb322e0248d4f806b885d44de)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Diffstat (limited to 'examples/datavisualization/qmlbars')
-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 76eff0f2..dfebf1b1 100644 --- a/examples/datavisualization/qmlbars/qml/qmlbars/main.qml +++ b/examples/datavisualization/qmlbars/qml/qmlbars/main.qml @@ -63,7 +63,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]; @@ -83,13 +83,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 { @@ -176,12 +175,9 @@ Item { } } - - ColumnLayout { id: tableViewLayout - anchors.top: parent.top anchors.left: parent.left @@ -195,7 +191,6 @@ Item { padding: 3 text: header.columnNames[index] } - } TableView { @@ -215,7 +210,6 @@ Item { rows: graphData.modelAsJsArray } - delegate: Rectangle { implicitHeight: 30 implicitWidth: tableView.width / 3 @@ -245,7 +239,6 @@ Item { return display } } - } } } @@ -258,7 +251,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]) @@ -388,7 +381,7 @@ Item { name: "portrait" PropertyChanges { target: dataView - width: mainview.height / 4 * 3 + width: mainview.width height: mainview.width } PropertyChanges { |