Details
-
Suggestion
-
Resolution: Unresolved
-
P2: Important
-
None
Description
Code
import QtQuick Window { id: root width: 640 height: 480 visible: true property int constVal: 100 property int boundVal: true ? 100 : 100 onConstValChanged: console.log("constValChanged:", root.constVal) onBoundValChanged: console.log("boundValChanged:", root.boundVal) }
Outcomes on Qt 6.8.1
When the app starts up...
- ...we see "boundValChanged: 100"
- ...we don't see ""constValChanged"
Suggestion
Both constVal and boundVal should behave the same, from the point of view of valueChanged signals
Attachments
Issue Links
- relates to
-
QTBUG-114403 No way to set initial properties in QtQuick
- Reported
-
QTBUG-131901 "var" and "variant" type properties emit valueChanged signal even when value remains unchanged
- Closed