Unsolved warning: this file is not part of any project.
-
@tereshko Faced the same when I migrate from Windows to Ubuntu. I guess it is an issue about the user configuration conflicts among the operation systems.
--NOOB SOLUTION ALERT--
I remember, I solved this issue by creating a new Qt project (creating the whole files again one-by-one) and copying the content to them :D
I wish you luck! -
You should make sure that no build artifacts or configuration files from the other system are copied over to the new systems.
Especially, Creators *.user files should never be shared.
Also, when transferring between Unix and Windows, the case sensitivity of path and file names is different. So
#include "Empty.h"
will fail on Unix if the file is namendempty.h
. Should be no problem in your case, but you may check that too.Regards
-
ok, i will try. Thnaks
-
@aha_1980
nono, i have only CMake file, *.h and *cpp -
Hey, I've got a similiar (if not THE same issue) but I didn't migrate from windows.
The point is, I managed it once to create a C++ file and found it in the correct place within QT, but I consider this as lucky shot.So It doesn't matter where I create the new C++ file, it never appears in the Header directory - but in the <Headers> Section, which is... kind of another project...thing?
Sorry for the noob question.Any help would be highly appreciated
-
@Meistermosher It look to me like you added systemcontroller.cpp and systemcontroller.h to the qml.qrc resource file! Why?
-
@jsulm Yeah that's the question x)
I hope I managed it so far (the right way):I rightclicked on "Source FIles" and chose "Add new" and created the C++ file.
After this I attached it to the "project: qml.qrc Prefix:/" which was "Thermostate" for obviously no reason
(but... this is wrong?)
And THEN I edited the CMakeList.txt and added the file manualy.And now it works...
MagicI hope this is (a) correct way of doing it- anyway the Error is gone.
-
@Meistermosher said in warning: this file is not part of any project.:
this is wrong?
Yes, it is. Resources are meant to be used to add data files to a project (and also QML code), but not C++ code. C++ code is compiled, not interpreted like QML.
-
@jsulm Yes, I see I'm taking a step back from here.
Most (Beginner) Tutorials left me a bit overwhelmed after a while.
I know some C++ and QT Core but just wanted to skip the Widgets and wanted to wrap my head around QML.
Sadly there are not THAT many good resources out there when it comes to C++ classes in QtQuick. :/ -
@Meistermosher Yes. It really works. :D