Details
-
Bug
-
Resolution: Fixed
-
P1: Critical
-
6.5.6, 6.7.1
-
None
-
-
0232ef390 (dev), da8dea905 (6.8), 71d60afc6 (6.7), 0994f9a8a (tqtc/lts-6.5)
Description
QML Item state change reverts item's size back to old size even size is not part of state property change. If Item size is scaled after Item has changed its state to a defined state Item size is reverted to original when Item state changes back to default state. This is a regression in Qt6, not reproducible with Qt5.15.17.
Customer has an issue in their mobile app where their ToggleSwitch thumb indicator (knob) size expands when disabled if it was enabled at startup. Size of the UI controls inside the application, including ToggleSwitch, are controlled via scaleFactor which is calculated at application startup. The issue emerged after transitioning from Qt5.15 to Qt6.
ToggleSwitch has been implemented in a way that knob position is controlled via anchoring. In ToggleSwitch main state knob is anchored to left of the toggle root object. It has a state "statusOn" where anchor is changed to right with AnchorChanges.
Example app which can be built on both Qt6 and Qt5 included and video on macOS attached.
- ToggleSwitch and knob size is calculated with initial default scaleFactor 1.
- If ToggleSwitch is enabled it changes its state into "statusOn"
- Value of the scaleFactor gets calculated
- ToggleSwitch and knob size get re-calculated to scaled size
- When ToggleSwitch is disabled at later point it changes its state to main state and knob gets the size it had before scaleFactor was adjusted
Attachments
For Gerrit Dashboard: QTBUG-126057 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
568607,5 | AnchorChanges: Account for undefined opposite edge on state reset | dev | qt/qtdeclarative | Status: MERGED | +2 | +1 |
570615,2 | AnchorChanges: Account for undefined opposite edge on state reset | 6.8 | qt/qtdeclarative | Status: MERGED | +2 | 0 |
570629,2 | AnchorChanges: Account for undefined opposite edge on state reset | 6.7 | qt/qtdeclarative | Status: MERGED | +2 | 0 |
570999,2 | AnchorChanges: Account for undefined opposite edge on state reset | tqtc/lts-6.5 | qt/tqtc-qtdeclarative | Status: MERGED | +2 | 0 |