Details
-
Task
-
Resolution: Fixed
-
P2: Important
-
None
-
3f4856dbc (dev)
Description
(name pending bikeshedding, string could be either QStringView or const QString &)
This should avoid the currently uglyness of having to load main.qml via the qrc path:
// current QQmlApplicationEngine engine("main.qml"); // bad if only qrc available // or QQmlApplicationEngine engine("qrc://coolproject/moduleA/main.qml"); // hassle to type // then QQmlApplicationEngine engine; engine.createComponen("coolproject.moduleA", "Main.qml") // TODO: return type? // should this maybe only be load, but QQMlComponent gets a create overload?
Further benefits might be the ability to easily access a QML singleton by name from C++.
Attachments
Issue Links
- resulted in
-
QTBUG-104764 Teach Loader (and friends) to load from module URI+typename
-
- Reported
-
- mentioned in
-
Page Loading...
For Gerrit Dashboard: QTBUG-97156 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
403697,41 | Long live QQmlComponent::loadFromModule! | dev | qt/qtdeclarative | Status: MERGED | +2 | 0 |
440101,24 | QmlComponent::ConstructionState: encapsulate creator | dev | qt/qtdeclarative | Status: MERGED | +2 | 0 |
440363,23 | WIP: Introduce module + type overload of Qt.createComponent | dev | qt/qtdeclarative | Status: ABANDONED | -2 | 0 |
441272,19 | Introduce type based overload of Qt.createComponent | dev | qt/qtdeclarative | Status: MERGED | +2 | 0 |
444638,3 | Introduce QQmlApplicationEngine::loadFromModule | dev | qt/qtdeclarative | Status: MERGED | +2 | 0 |
444737,3 | QQmlComponent/QQmlIncubator: Support C++ based types | dev | qt/qtdeclarative | Status: MERGED | +2 | 0 |
445013,1 | WIP: Introduce type based overload of Qt.createComponent | dev | qt/qtdeclarative | Status: DEFERRED | -2 | 0 |