Details
-
Suggestion
-
Resolution: Fixed
-
P2: Important
-
5.12.6, 5.13.2, 5.14.0
-
-
5a908de8b7e772e78adb30cc3205c7cf5bd622f5
Description
Introducing qmlRegisterValueType() would be very useful under some circumstances and may unify the built-in types implementation in current QML engine, e.g:
// MyControl.qml
import QtQuick 2.12 import QtQuick.Controls 2.12 as C Item { property C.IconValueType icon }
We can also use the constructors that are marked with Q_INVOKABLE to initialize a value type property:
import QtQuick.Controls 2.12 as C MyControl { icon: "icon1" // implicit type casting provided by constructor // a better Qt.icon() approach Component.onCompleted: icon = new C.IconValueType("icon2", 16, 16) }
Attachments
Issue Links
- is required for
-
QTBUG-79330 Improve handling of Q_GADGETs in QML
- Open
- relates to
-
QTBUG-82443 Value types and Containers in QML
- Closed