Details
-
User Story
-
Resolution: Unresolved
-
P1: Critical
-
None
-
None
-
-
2024wk18FOQtforAndroid, 2024wk20s2FOQtforAndroid, 2024wk22s2FOQtforAndroid, 2024wk24s2FOQtforAndroid
-
4f4160fb6 (dev), 7282c54fe (dev), 876991d8b (dev), afd1bb021 (dev), 3cdf282d9 (dev), a8007cc3d (dev)
Description
Why?
All current (6.7) QtQuickView communication APIs (set/get/connect) have String based parameters: property names and signal names.
It is error prone and works against decoupling of QML project and Java project. Changes in QML project, can break the Java project without development time or compile time errors. **
How?
As the metatype information is available after building the QML project, one possible solution is to generate Java classes that carry required metatype info. The user will be able to pass those types as "properties" or "signals" instead of Strings.
// Before qtQuickView.setProperty("rotation", 10.0);
Becomes:
// After
qtQuickView.setProperty(AppModule.Properties.rotation, 10.0);
where the AppModule.Properties is a java class, and rotation can be another class or even again a String field (if String, that keeps the method signature intact).
Edit Note: T
Attachments
Issue Links
- depends on
-
QTBUG-125769 Separate callback interfaces from QtQuickView and introduce public enum QtQmlStatus
- Closed
- resulted in
-
QTBUG-125887 Add if blocks/asserts for engine() null and reinterpret_cast of 0
- Reported
-
QTBUG-125891 Handling of dotted URI QML modules
- Reported
1.
|
Strong typing change for Java Example | In Review | Konsta Alajärvi | |
2.
|
Strong typing change for Kotlin Example | In Review | Konsta Alajärvi | |
3.
|
Strong typing doc updates | Closed | Nicholas Bennett | |
4.
|
Testing | Open | Olli Vuolteenaho | |
5.
|
Dealing with qml files starting with low-case letter | Reported | Unassigned | |
6.
|
Qml project URI name can't be same as module name | Reported | Soheil Armin | |
7.
|
Strong typing Doc changes for the Kotlin and Java examples | In Review | Konsta Alajärvi |