-
Notifications
You must be signed in to change notification settings - Fork 61
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
✨ Support Qt Designer #78
Comments
In this commit I solve the C++ side of the problem. Now it build and link and run: QQmlApplicationEngine failed to load component
qrc:/main.qml:3:1: Qaterial.ApplicationWindow is not a type But , that is a bit weird, shouldn't that just work? because in qaterial::loadQmlResources();
qaterial::registerQmlTypes(); |
So, the binary start and can load QML, but the UI of Qt creator still complains that |
Ok, so for now all your problems are not related to qt creator but to cmake (which are the one everyone is struggling with starting with cmake) |
@OlivierLDff thanks, this doc give a few possible fixes for the missing qml in creator itself, I'm also investigating |
You should use https://github.com/OlivierLDff/QaterialGallery as a reference |
I fixed QT Creator in ochagnon/qaterial-qtcreator-bug@18c4afd |
This kind of fix is ugly, because it is hard coded path. When deploying your app it will be a nightmare. |
that don't solve everything, there is additional issues
|
how? |
I'm looking at gallery as a reference and I don't see an obvious command that embed Qaterial into the gallery |
Yes because you are missing a file in qrc:/Qaterial/Impl/Icons which is only in qrc (because generated) |
I opened your example on windows
And the app launched. Did you clean your cmake build folder? |
But, how can I add this resource with mine? I don't see anything in this directory |
yes, the application build and run, but the problem is when I try to open QtCreator designer (very important for development). First, I had to add This is where the missing icons error show up. This is probably because I don't use any icons at this point in my I tried with Gallery demo app, and I have an other problem. |
The problem is only in QtCreator in "Design" mode |
I never used design, I know qaterial should be compiled as a plugin for it to work and there is special requirements. |
The file you are missing are located in your build folder |
Warning: I'm not familiar with
cmake
, my experience had been withqmake
so far. My question will probably be asked again and again, as QT Creator is a popular IDE for Qt/QML applications.I'm trying to use Qaterial with QTCreator. In this Github repo, I provide the code I use to reproduce this problem, with 1 commit per change I perform. You can very easily try yourself.
So, I start from scratch and create a
Test
project that usecmake
. This commit just the initial output of Qt Creator.Then, I add this commit that switch C++ and QML to Qaterial and add dependency build.
But, that don't works, build fail with
Sure, the reason is those files are in
build-Test-Desktop_Qt_5_15_1_clang_64bit-Debug/_deps/qaterial-src/
.From QtCreator cmake integration doc:
So, I tried
find_package(Qaterial)
and output of cmake is:In Qaterial repository, there is no
*config*.cmake
norFind*.cmake
.So, how can I use Qaterial with Qt Creator?
The text was updated successfully, but these errors were encountered: