SUMMARY We want to have a slider with the values 1, 2, 3, 4, 5. We set "from" to 1, "to" to 5, "stepSize" to 1. Instead of the slider moving between our desired values, it first moves from 1 to about 1.2. Afterwards the slider placement is wrong and is cca 2.4, 3.8, 5.0. STEPS TO REPRODUCE 1. run the following code in qmlscene: import QtQuick.Controls 2.5 Slider { from: 1 to: 5 stepSize: 1 } OBSERVED RESULT Slider values are wrong. EXPECTED RESULT Slider values are 1, 2, 3, 4, 5. SOFTWARE/OS VERSIONS Operating System: Manjaro Linux KDE Plasma Version: 5.15.3 KDE Frameworks Version: 5.56.0 Qt Version: 5.12.1 ADDITIONAL INFORMATION QQC1 slider does not suffer from this issue.
Can confirm. You can see this in the wild with the Libinput mouse & touchpad KCMs too.
Reproducible with the test case with Qt 5.12.2. Please report this issue directly to Qt developers via https://bugreports.qt.io/
Please ignore comment #2. I now tested using "XDG_CURRENT_DESKTOP=QT qmlscene test.qml" which works correctly, so the bug is indeed in the Plasma QtQuick style.
Git commit 6d0289d7b284f5074c5f8ffe5ee6879f656e0724 by Filip Fila. Committed on 15/05/2019 at 16:34. Pushed by filipf into branch 'master'. [QQC2 Slider Style] Fix wrong handle positioning when initial value is 1 Summary: Old code was not reading value properly when initial value was 1, misplacing the handle as a result. Test Plan: Tested by running qmlscene with: ``` import QtQuick.Controls 2.5 Slider { from: 1 to: 5 stepSize: 1 //orientation: Qt.Vertical } ``` Tested both in horizontal and vertical orientation. You can also test this in the Mouse KCM, with the Pointer Speed slider. Reviewers: mart, #plasma, ngraham, broulik Reviewed By: mart, #plasma, ngraham Subscribers: broulik, plasma-devel Tags: #plasma Differential Revision: https://phabricator.kde.org/D21075 M +3 -2 org.kde.desktop/Slider.qml https://commits.kde.org/qqc2-desktop-style/6d0289d7b284f5074c5f8ffe5ee6879f656e0724