| Summary: | simple Qt5 qml app does not start | ||
|---|---|---|---|
| Product: | [Applications] marble | Reporter: | Dibala Vasiliy <dibalavs> |
| Component: | general | Assignee: | marble-bugs |
| Status: | REPORTED --- | ||
| Severity: | normal | CC: | alessandro.pezzato, nienhueser |
| Priority: | NOR | ||
| Version First Reported In: | unspecified | ||
| Target Milestone: | --- | ||
| Platform: | Ubuntu | ||
| OS: | Linux | ||
| Latest Commit: | Version Fixed/Implemented In: | ||
| Sentry Crash Report: | |||
| Attachments: | attachment-6832-0.html | ||
I have exactly the same problem, Qt 5.5 on gentoo x86_64 For Qt Quick 1.1 it was necessary to set QML_IMPORT_PATH. Otherwise you get that import error. Setting QML_IMPORT_TRACE=1 is useful to debug such problems. Just recently we moved to Qt Quick 2 in the master branch and upgraded org.kde.edu.marble from 0.11 to 0.20. I changed the declarative plugin to a library-style plugin which means that at the moment qmlviewer will not be able to import org.kde.edu.marble 0.20. This was easier to get it running on Android, but I might change that until the next release to enable direct .qml loading again. When that is done, QML2_IMPORT_PATH must be set. Created attachment 94075 [details]
attachment-6832-0.html
Thank you Dennis. I've found the example in src/examples/cpp/marbleQuick2
which is working with QtQuick 2. I can reproduce it in my app only manually
copying src/lib/marble/declarative/*.h files in the install path. These
headers are not normally installed like others.
Thank you for the bug report. As this report hasn't seen any changes in 5 years or more, we ask if you can please confirm that the issue still persists. If this bug is no longer persisting or relevant please change the status to resolved. |
1. compile from trunk use configuration: cmake -DCMAKE_BUILD_TYPE=Release -DQTONLY=TRUE -DQT5BUILD=TRUE -DBUILD_MARBLE_TESTS=NO -DCMAKE_INSTALL_PREFIX=~/Work/marble/export ~/Work/marble/sources: 2. launch simple quick 2.0 app: import QtQuick 2.0 import org.kde.edu.marble 0.11 MarbleWidget { projection: "Mercator" mapThemeId: "earth/openstreetmap/openstreetmap.dgml" } qmlscene -I /home/vasily/Work/marble/export/lib/marble/plugins/ /home/vasily/Work/marble/sources1/examples/qml/test.qml and got error: vasily@vasily-pc:~/Work/marble/build$ qmlscene -I /home/vasily/Work/marble/export/lib/marble/plugins/ /home/vasily/Work/marble/sources1/examples/qml/test.qml QObject: Cannot create children for a parent that is in a different thread. (Parent is MarbleDeclarativePlugin(0x7fae4406fc00), parent's thread is QThread(0x1f65910), current thread is QThread(0x1bd58e0) QIODevice::write: device not open QIODevice::write: device not open QIODevice::write: device not open QIODevice::write: device not open QIODevice::write: device not open QIODevice::write: device not open 3. try to launch as Quich 1.0 app: import QtQuick 1.0 import org.kde.edu.marble 0.11 MarbleWidget { projection: "Mercator" mapThemeId: "earth/openstreetmap/openstreetmap.dgml" } vasily@vasily-pc:~/Work/marble/build$ qmlviewer -I /home/vasily/Work/marble/export/lib/marble/plugins/ /home/vasily/Work/marble/sources1/examples/qml/test.qml Qml debugging is enabled. Only use this in a safe environment! file:///home/vasily/Work/marble/sources1/examples/qml/test.qml:2:1: plugin cannot be loaded for module "org.kde.edu.marble": Unknown error import org.kde.edu.marble 0.11 ^ Reproducible: Always Steps to Reproduce: 1. compile 2. launch 3. ??? 4. no profit workstation: Ubuntu 12.04 64 bit Qt 5.3 downloaded from Qt-project site