- 
    Bug 
- 
    Resolution: Unresolved
- 
    P2: Important 
- 
    6.5.4, 6.5.6
- 
    None
Can not assign an int to an enum property even though the enum maps exactly to that int. In this case ShaderEffectSource.ClampToEdge maps to 0 as the output shows.
qrc:/qt/qml/untitled12/Main.qml:10:25: Invalid property assignment: unknown enumeration
import QtQuick Window { width: 640 height: 480 visible: true title: qsTr("Hello World") Item { layer.wrapMode: 0 // ShaderEffectSource.ClampToEdge Component.onCompleted: console.log(ShaderEffectSource.ClampToEdge) } }
When using an additional property as shown in the example below it works with integers.
import QtQuick Window { id: root width: 640 height: 480 visible: true title: qsTr("Hello World") property int test: 1 // Qt.LeftButton MouseArea { acceptedButtons: root.test Component.onCompleted: console.log(Qt.LeftButton) } }
This isn't fixed with QTBUG-121710 I've tested it with Qt 6.5.6 with the same outcome.
- relates to
- 
                    QDS-11845 Unable to open E-Bike Design example -         
- Closed
 
-         
- 
                    QTBUG-121710 [Reg 6.6.0 -> 6.6.1] Aliasing to enums does not work as in Qt 6.6.0 an earlier anymore -         
- Closed
 
-