GUI fails to resolve QML source file paths after installation #12

Open
opened 2026-01-31 13:11:24 +00:00 by shaunrd0 · 1 comment
Owner

with cargo install --path . you can run clide directly for the TUI, but if you move to a location other than the root of this repository QML will fail to resolve sources

shaun@pc:~/Code$ clide -g
QQmlApplicationEngine failed to load component
file:///home/shaun/Code/qml/main.qml: No such file or directory

Not sure what to do here, because you can't provide absolute paths the QML in CXX-QT?

bfdacd0698 (diff-a857d8ab271a343f5e402e90ab60a62dcdacbccd2d5d9fc889715fe53560a337R914-R916)

I'm using the API as shown in the examples from the KDAB CXX-QT book: https://kdab.github.io/cxx-qt/book/getting-started/4-cargo-executable.html

with `cargo install --path .` you can run `clide` directly for the TUI, but if you move to a location other than the root of this repository QML will fail to resolve sources ```bash shaun@pc:~/Code$ clide -g QQmlApplicationEngine failed to load component file:///home/shaun/Code/qml/main.qml: No such file or directory ``` Not sure what to do here, because you can't provide absolute paths the QML in CXX-QT? https://github.com/KDAB/cxx-qt/commit/bfdacd069893bf10612cc5c393c4e8055adf26ab#diff-a857d8ab271a343f5e402e90ab60a62dcdacbccd2d5d9fc889715fe53560a337R914-R916 I'm using the API as shown in the examples from the KDAB CXX-QT book: https://kdab.github.io/cxx-qt/book/getting-started/4-cargo-executable.html
shaunrd0 added the
gui
label 2026-01-31 13:11:30 +00:00
shaunrd0 added this to the 0.1 milestone 2026-01-31 13:11:55 +00:00
Author
Owner

I thought maybe the QQmlApplicationEngine should be given an absolute path for addImportPath, but the docs say path is canonicalized.

https://doc.qt.io/qt-6/qqmlengine.html#addImportPath

I thought maybe the QQmlApplicationEngine should be given an absolute path for `addImportPath`, but the docs say path is canonicalized. https://doc.qt.io/qt-6/qqmlengine.html#addImportPath
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: shaunrd0/clide#12
No description provided.