Solved Adding QML file (Qt Quick 2) to Qt project
-
Hi,
To implement qml busy indicator, I added Busy.qml to the project using File-New File or Project-QML File (Qt Quick 2). When I try to build it it gives me the following error message:
:-1: error: No rule to make target 's', needed by 'debug/s.o'. Stop.
What am I missing?I have a separate working qml project with the busy indicator,. Any way I can just import it into my Qt project? Thank you for your help.
-
What is that "s" object - some c++ class or something? Does you Qt project have any QML there already or rather it is widget-based maybe?
-
@sierdzio
Hi,
's' is not a class for sure. The truth is I have no idea what it is. The app is mostly widget based. This is the first QML file added (and my first try combining QML and Qt). So I appreciate any help. -
In order to embed QML components in QtWidgets you need to use QQuickWidget (well, there are other options, too).
You need to check what "s" is. It is not QML component for sure, because the error you are getting comes from the Makefile and is related to c++. Check your .pro file, maybe there is some "s" there.
-
@sierdzio
I still have no idea what 's' is, but after re-implementing busy.qml 's' disappeared and it works fine without any error. Thank you for your help. -
well, ok, good that it works now :) Happy coding!