SUMMARY I was working on a plasma widget with a horizontal slider which should be shown vertical in some cases and encountered unexpected event feedback in different orientations. STEPS TO REPRODUCE Boiled down example with two widgets which only differ in the orientation: ``` PlasmaComponents.Slider { id: horizontalSlider minimumValue: 0 value: 10 maximumValue: 100 stepSize: 1 Connections { target: horizontalSlider function onValueChanged() { console.log("horizontal slider value: " + horizontalSlider.value) } } } PlasmaComponents.Slider { id: verticalSlider minimumValue: 0 value: 10 maximumValue: 100 stepSize: 1 orientation: Qt.Vertical // inverted: true Connections { target: verticalSlider function onValueChanged() { console.log("vertical slider value: " + verticalSlider.value) } } } ``` OBSERVED RESULT qml: vertical slider value: 90 qml: horizontal slider value: 10 EXPECTED RESULT qml: vertical slider value: 10 qml: horizontal slider value: 10 SOFTWARE/OS VERSIONS Operating System: EndeavourOS KDE Plasma Version: 5.27.8 KDE Frameworks Version: 5.110.0 Qt Version: 5.15.10 Kernel Version: 6.5.3-4-cachyos (64-bit) Graphics Platform: Wayland
You seem to be using PlasmaComponents 2.0 (which you should've stated in the bug report btw, but I guess it from the properties that you are using here). PC2 are no longer supported, as they are based on QtQuick.Controls 1, which in turn were deprecated for quite some time, and eventually removed in Qt 6. Please use QtQuick.Controls 2 and PlasmaComponents 3. By the way, in Qt 6 QML you won't need import versions anymore, and there would be only one — the right one — module that you should use. Also, heads-up about Slider & ProgressBar: if you are going to change their maximum value after creation, do so before updating `value` property or else the value would get clamped.