Details
-
Bug
-
Resolution: Done
-
P1: Critical
-
4.7.0
-
None
-
Maemo 5/N900 - Using the build released at http://labs.trolltech.com/blogs/2010/03/17/experimental-qt-47-packages-for-the-n900/
Description
This is a bit complex to explain, so bear with me.
What I'm doing: C++ app that uses QDeclarative* classes to:
- load an initial [ROOT ITEM].qml (main view of my app, always present)
- inject/remove from the scene other [ITEMs].qml (views stacked on the top of my main view, and controlled through signals emission)
- a "bridge" object exposes some C++ calls to the QML space, to allow QML components to do things outside the C++ space.
- I call QDeclarativeEngine::setBaseUrl() to set the base url.
Every QML Item is a composition of other smaller items. Those are held in a directory structure like:
- MainView.qml
- SecondaryView.qml
- MainViewComponents/subcomponent1.qml
- MainViewComponents/subcomponent2.qml
- MainViewComponents/subsubcomponent1.qml
- SecondaryViewComponents/subcomponent1.qml
and so on...
The Views import their "components" using: "import 'MainViewComponents'"
Subcomponents do the same with other "sub-subcomponents".
The QMLs are ALSO imported in a QRC file: in this way there is no need to bring around the files.
QDeclarativeEngine::setBaseUrl() infact works also with a "qrc:/qmls/". In this way I get the maximum flexibility.
Problem: when running this kind of stuff on Maemo5, I get messages like "Type [my type] unavailable".
I tried WITH and WITHOUT the usage of QRC-based URLs. No difference.
Sorry I can't provide the actual code: I tried to explain as much as possible.
NOTE: I'm still trying to figure out the cause. I'll try to find an actual solution.
UPDATE (2010-03-22):
Seems like the problem was a "chain" of "component unavailable", caused by the fact that the first element to be "unavailalbe" is the WebView.
Adding a very basic test .QML that shows the problem: webviewtest.qml.
Try to run it with a:
- /opt/qt4-maemo5/bin/qml webviewtest.qml
result will be:
file:///home/user/webviewtest.qml:4:1: Type WebView unavailable
WebView {
^
Wall startup time: 28
This doesn't happen on other platforms.