Details
-
Bug
-
Resolution: Done
-
P3: Somewhat important
-
4.7.4, 4.8.0
-
None
-
Windows 7 64-bit using 4.8.0 and 4.7.4. Also reproducible on Symbian Belle.
-
4c9d326230a2c522bc8fd80eee9664c7d0c1205f
Description
When setting the default value of a property to an enumeration value, its on<Property>Changed signal is triggered. If the property is set to an integer directly, the signal isn't triggered. Setting default values for properties shouldn't trigger on<Property>Changed.
The following code outputs:
"Status in second item changed to:9"
import QtQuick 1.1 Rectangle { width: 200; height: 200; Item { property int status: 9 onStatusChanged: console.log("Status in first item changed to:" + status) } Item { property int status: Qt.blue // Use any enumeration value, either from system or own. onStatusChanged: console.log("Status in second item changed to:" + status) } }
This is the root cause for qt-components issue:
https://bugreports.qt.nokia.com/browse/QTCOMPONENTS-1199