Qt 6.11 is out! See what's new in the release
blog
Pl Explain math in Dial qml example
QML and Qt Quick
4
Posts
2
Posters
5.2k
Views
1
Watching
-
Aesthetics probably. Angles between -130 and +133 are shown. This whole thing results in root.value being a number between 0 and (133 + 130)/2.6, which is 263/2.6 ~= 100.
So given that information, it is all about scaling a 0-100 value to range that looks nice.
-
Seems to make sense now. The 'dial control' code shows the x position has been multiplied by a factor of 100, so to offset that dial code has been scaled down by roughly 100 but the dial has value up 0 to 120 - so they are off by 20 degree ? To offset slider which is 34 px in width, 30 px has been subtracted from slider container width. Why would they complicate the code unnecessarily is beyond me.