Problem with QMain Window
-
Hi
Unless you are using a super old Qt then its just
#include <QMainWindow>also, make SURE no moc__ files are in the project folder. They are generated and should live in the build folder.
If it find old moc__ files, odd stuff will happen :) -
Hi
Unless you are using a super old Qt then its just
#include <QMainWindow>also, make SURE no moc__ files are in the project folder. They are generated and should live in the build folder.
If it find old moc__ files, odd stuff will happen :)@mrjj Hi,
I had the newest version of Qt, but I don't know why I can't #include <QMainWindow>, because for some reasons ' cannot open source faile "QMainWindow".'
I should remove all files moc__ .. cpp also? I find them in project in folder x64/release/moc.
In pre-build event -> command line is command that creates moc.exe MainWindow.h -o moc_MainWindow.cpp
moc.exe GuiUpdatingThread.h -o moc_GuiUpdatingThread.cpp -
@mrjj Hi,
I had the newest version of Qt, but I don't know why I can't #include <QMainWindow>, because for some reasons ' cannot open source faile "QMainWindow".'
I should remove all files moc__ .. cpp also? I find them in project in folder x64/release/moc.
In pre-build event -> command line is command that creates moc.exe MainWindow.h -o moc_MainWindow.cpp
moc.exe GuiUpdatingThread.h -o moc_GuiUpdatingThread.cpp@Ewa-Miazga said in Problem with QMain Window:
x64/release/moc.
This seems ok as not a project folder directly.
But it also seems non standard which means that the -pro file might be special.Have you tried to go
File->New Project
then just Next, Next
Then you get a clean project with QMainWindow
Its just to see if that ones just works so we know if its this project somehow or something with the installation
-
Hi,
Seeing the age of the project, you likely are missing
QT += widgets
in your .pro file. -
@SGaist I added it, but it changed nothing.
-
@JoeCFD
in .pro file:
CONFIG += no_fixpath
QT += core uitools widgetsDEFINES -= UNICODE _UNICODE
-
@Ewa-Miazga said in Problem with QMain Window:
x64/release/moc.
This seems ok as not a project folder directly.
But it also seems non standard which means that the -pro file might be special.Have you tried to go
File->New Project
then just Next, Next
Then you get a clean project with QMainWindow
Its just to see if that ones just works so we know if its this project somehow or something with the installation
@mrjj
It works.
I decided to copy all the files to new console application qt project in visual studio and now I have plenty of unexternal symbols... -
The suggestion is to create a Qt Widgets application so you ensure that it's properly configured to build using the widgets module.
-
The suggestion is to create a Qt Widgets application so you ensure that it's properly configured to build using the widgets module.
@SGaist I checked it. It works.