-
Notifications
You must be signed in to change notification settings - Fork 80
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unresolved imports QGuiApplication
, QQmlApplicationEngine
when building with Cargo on Windows
#1148
Comments
I just ran into this problem as well! To solve it, you need to specify that you want all features of Once I added that to my Cargo.toml, rust-analyser recognised those imports you mentioned, and it compiled fine. The book also specifies the wrong feature flag in the reference Cargo.toml; it specifies |
You probably only need |
Just tried and failed to reproduce the error I allegedly got when using the "qt_full" feature flag; my code, which is essentially the example in the book, compiled just fine with ["full"], ["qt_full"], and ["qt_qml", "qt_gui"] feature flags. Copy-and-pasting the Cargo.toml in the book also compiles fine. (My bad, sorry - maybe I made a typo in the Cargo.toml and didn't notice?) |
Thank you @ubas-of-the-bush for following up on this. This should be solved by enabling I will close the issue for now. @Artalus if you still encounter the issue even after enabling the required features, please reopen the issue. |
I am following the Book and copypasting the code from there as I go. I am on Windows, so initially I ran into #1120 , but after switching to an Admin shell, I now get this:
My
Cargo.toml
:The only difference from https://kdab.github.io/cxx-qt/book/getting-started/4-cargo-executable.html is that
cxx
is1.0.135
instead of1.0.95
, but downgrading it does not change anything, ascargo
keeps downloading1.0.135
for some reason.The copypasted contents from Book:
src\cxxqt_object.rs
src\main.rs
build.rs
The text was updated successfully, but these errors were encountered: