Details
-
Bug
-
Resolution: Invalid
-
P2: Important
-
None
-
Qt Creator 2.2.0
-
None
-
PC Ubuntu + Qt 4.7.3
Description
I tried to use the example of code included in the autogenerated Qt Quick application but this does not support qml files in qrc.
//It is not possible to use a qrc file with this API // viewer.setMainQmlFile(QLatin1String("qrc:/qml/main.qml")); //Error is: file:///home/ag/workspace/qt-workspace/steptest-build-desktop/qrc:/qml/main.qml: File not found
I had to use instead
viewer.setSource(QUrl("qrc:/qml/main.qml"));
Is it the right way to use it ?