error: C1083: Cannot open include file: 'QMainWindow': No such file or directory
-
@Panoss From the picture you posted I can see that Qt creator recognized MinGW.
The second picture shows that you have issues with two of your Kits: Desctop and Unnamed.
You should check them. Which of these Kits are you using?
It is better to use MinGW which is provided with Qt: just use Qt Maintenance Tool to install Qt for MinGW and MinGW. I never had any issues with this combination. -
@jsulm said in error: C1083: Cannot open include file: 'QMainWindow': No such file or directory:
just use Qt Maintenance Tool to install Qt...
What is Qt Maintenance tool?
-
I 'm currently installing it with the online installer.
It says it needs 6,32 (!!!)GB space for installation!
Now I remembered why I had rejected Qt Designer and tried to use NetBeans.
Anyway, I will install it for now, but later I will try the other way which is much more 'economical' when we 're talking about HDD space. -
I 'm currently installing it with the online installer.
It says it needs 6,32 (!!!)GB space for installation!
Now I remembered why I had rejected Qt Designer and tried to use NetBeans.
Anyway, I will install it for now, but later I will try the other way which is much more 'economical' when we 're talking about HDD space.@Panoss 6,32GB?! What did you select to install? QtCreator is around 240MB, I don't think Netbeans is smaller. Qt 5.8 consumes 2,87GB on my machine.
Which of the Kits did you use? All auto-detected Kits are for Visual Studio, not MinGW! It looks like you installed several Qt versions for Visual Studio, why? You wanted to use MinGW, right?
Remove all Qt for Visual Studio and add Qt 5.8 for MinGW and make sure MinGW is selected under Qt/Tools in Qt Maintenance Tool. -
@Panoss 6,32GB?! What did you select to install? QtCreator is around 240MB, I don't think Netbeans is smaller. Qt 5.8 consumes 2,87GB on my machine.
Which of the Kits did you use? All auto-detected Kits are for Visual Studio, not MinGW! It looks like you installed several Qt versions for Visual Studio, why? You wanted to use MinGW, right?
Remove all Qt for Visual Studio and add Qt 5.8 for MinGW and make sure MinGW is selected under Qt/Tools in Qt Maintenance Tool.@jsulm said in error: C1083: Cannot open include file: 'QMainWindow': No such file or directory:
@Panoss 6,32GB?! What did you select to install? QtCreator is around 240MB, I don't think Netbeans is smaller. Qt 5.8 consumes 2,87GB on my machine.
I left the default settings.
Indeed, I saw multiple versions of Qt selected, but I thought 'it's the default, I'll leave it as is'Which of the Kits did you use? All auto-detected Kits are for Visual Studio, not MinGW! It looks like you installed several Qt versions for Visual Studio, why?
No, I didn't want anything ike this. They automatically got installed. I 'll remove them.
You wanted to use MinGW, right?
Yeah. It's just that I 'm an absolute beginner and I've messed everything up!
Remove all Qt for Visual Studio and add Qt 5.8 for MinGW
I 'll do this.
and make sure MinGW is selected under Qt/Tools in Qt Maintenance Tool.
This is what I had selected in the beginning, but then I deselected MinGW under Qt/Tools and selected MinGW under Qt 5.8.
And worked, while with the previous selection didn't.
(I noticed that when I selected the MinGW under Qt 5.8, automatically a MinGW under Qt/Tools was also selected ) -
jsulm I did as you said, I made a test Qt Applicaion, it run from the very first time!!
But, in the editor, it shows errors: words underlined with red color, others with yellow - light green color.
And red circles on the left.
But, despite these, the program compiles and runs!
Take a look at the picture to see what I mean:
EDIT: The errors disappeared! I didn't do anything!
-
Might be the code model that wasn't completely initialised yet.
-
By the way, since you have it working now, please mark the thread as solved using the "Topic Tools" button so that other forum members may know a solution has been found :)