From 751f755213aedcfe7c36aeebf1e2ae6a010d0bde Mon Sep 17 00:00:00 2001 From: Tuomo Pelkonen Date: Mon, 15 Feb 2021 12:07:48 +0200 Subject: Fix layout and signal handling in QML apps MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Task-number: QTBUG-90664 Change-Id: I181a3b3b2a1801665a0d876a837054aa10425c0d Reviewed-by: Tomi Korpipää (cherry picked from commit 9cb0e5714182df7f7d6b4fb291ffb83b614750d5) Reviewed-by: Qt Cherry-pick Bot --- examples/datavisualization/qmllegend/qml/qmllegend/LegendItem.qml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'examples/datavisualization') 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 } } -- cgit v1.2.3