File tree 2 files changed +9
-0
lines changed
crates/cxx-qt-lib/src/qml
2 files changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -38,6 +38,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
38
38
- QObject subclasses can now inherit from other CXX-Qt generated QObject classes
39
39
- ` BUILD_WASM ` CMake option to support WebAssembly builds and a book page for building for WASM
40
40
- Add support for cxx_name and rust_name on qproperty attributes which applies to the QProperty generated as well as functions
41
+ - Add support for loading QML files in ` QQmlApplicationEngine ` from modules with ` loadFromModule ` .
41
42
42
43
### Changed
43
44
Original file line number Diff line number Diff line change @@ -12,6 +12,8 @@ mod ffi {
12
12
type QStringList = crate :: QStringList ;
13
13
include ! ( "cxx-qt-lib/qurl.h" ) ;
14
14
type QUrl = crate :: QUrl ;
15
+ include ! ( "cxx-qt-lib/qanystringview.h" ) ;
16
+ type QAnyStringView < ' a > = crate :: QAnyStringView < ' a > ;
15
17
16
18
include ! ( "cxx-qt-lib/qqmlapplicationengine.h" ) ;
17
19
type QQmlApplicationEngine ;
@@ -36,6 +38,12 @@ mod ffi {
36
38
/// Loads the root QML file located at url.
37
39
fn load ( self : Pin < & mut QQmlApplicationEngine > , url : & QUrl ) ;
38
40
41
+ /// Loads the QML type typeName from the module specified by uri.
42
+ /// This function was introduced in Qt 6.5.
43
+ #[ cfg( any( cxxqt_qt_version_at_least_7, cxxqt_qt_version_at_least_6_5) ) ]
44
+ #[ rust_name = "load_from_module" ]
45
+ fn loadFromModule ( self : Pin < & mut QQmlApplicationEngine > , uri : QAnyStringView , typeName : QAnyStringView ) ;
46
+
39
47
/// This property holds the directory for storing offline user data
40
48
#[ rust_name = "offline_storage_path" ]
41
49
fn offlineStoragePath ( self : & QQmlApplicationEngine ) -> QString ;
You can’t perform that action at this time.
0 commit comments