QMainWindow file not found
-
Hi. I'm not sure if this is the correct category of this topic, but I'm in a hurry wondering how to solve this problem. Since I've searched and tried many possible solutions provided from past questions and still failed, I appreciate everyone who provides new solution or tell me where I made mistakes.
Here's my .pro file and the debug message.
Thanks a lot! -
Hi Yi-Fan and welcome to the Qt forum,
Do you notice the difference between line 7 and 8 :
QT versus Qt. It should be QT there.line 8 is even not needed since it's already in line 10, which tells us : if your Qt version is greater than 4 than add the module widgets.
-
Hi Yi-Fan and welcome to the Qt forum,
Do you notice the difference between line 7 and 8 :
QT versus Qt. It should be QT there.line 8 is even not needed since it's already in line 10, which tells us : if your Qt version is greater than 4 than add the module widgets.
-
Do you have #include "mainwindow.h" in you main.cpp file.
As I can see you are using a Qt wizard to make a QMainwindow based test application. This should work out of the box. What did you change?
A good way to start learning is to start from the wizard, build and run, make some more changes and run again. If you made mistakes, you will know immediately what you have done.
-
I suspect the directory of the header file is the problem.
I install the application on a portable external hard drive. Shall I change any setting to let IDE know where is the correct directory?@Yi-Fan said in QMainWindow file not found:
I suspect the directory of the header file is the problem.
I install the application on a portable external hard drive. Shall I change any setting to let IDE know where is the correct directory?Can you elaborate on you setup? otherwise we will be guessing for a long time what is going on.
What OS are you on, what kits did you use, what version of Qt (I suspect 5.9).... -
@Yi-Fan said in QMainWindow file not found:
I suspect the directory of the header file is the problem.
I install the application on a portable external hard drive. Shall I change any setting to let IDE know where is the correct directory?Can you elaborate on you setup? otherwise we will be guessing for a long time what is going on.
What OS are you on, what kits did you use, what version of Qt (I suspect 5.9).... -
@Yi-Fan
I would recommend to take some time to read the Qt Creator Manual - getting started It's a good read and you will feel much more confident in this new environment later on.If you will follow that link, you will encounter also the location of kits.