QPrinter problem QT 5.9.2 and 5.8
-
I went on the QT website, downloaded the open source installer.
Downloaded and Installed QT 5.9.2 MinGW 5.3.0 32 bit. And I checked all the tools. -
@Krasnoiark
That sounds pretty ok.Can you try this default project and tell if it also gives errors?
https://www.dropbox.com/s/wxcdigflnwbeq4d/myprinter.zip?dl=0Also, you are targeting Desktop, correct ?
Its not bare metal project or something like that? -
@Krasnoiark Most probably not the reason for the problem, but why do you add core and gui twice to QT?
-
It compiles and there is no errors
-
@Krasnoiark
So i think your .pro or kit selection might be messed up.This is a desktop app, correct?
-
Yes, this is a Desktop project and the project is a QTWidget project insite 2 other QT Sub-projects.
-
Hmm
It does look fine with the kit.It must be something with the pro file then
Since the test project worked and I assume you compiled that
exactly like this. -
https://drive.google.com/file/d/0B3foRMnUz_jLM1FPTVZZb1U2LUE/view?usp=sharing
This is my .pro file
-
@Krasnoiark You still add gui twice.
Do you have other Qt installations on your machine? -
It seems not to be the pro file as
it is pretty basic and it could compile my project too.And QPrinter is included in the installation as a default project works.
My best bet is that the
$$files(.cpp)
$$files(classes/.cpp)
$$files(gui/*.cpp) \find something we dont expect and include.
-
@mrjj I have tryed retyping all the pro file with all the files included but no luck.
Do you think it could be about the multiple projects ? I have my software project inside a sub-project inside an other sub-project. (My team needed multiple projects in order to have the testing project and the software and a 2nd project because our project has multiple softwares ).
In the sub project I only include the projects it gathers. Should I include qprintsupport inside that pro file ? -
If the sub projects also have .pro file
and you get the linker error in them/related to those files
then yes, you need
QT+=printsupport there also to link the module to that set of .o files. -
OK THAT WAS IT ! I had to include inside the pro files the QT += printsupport.
Thank you for helping me and sorry for taking your time. It was pretty stupid of me not to check that.
Anyway, thank you. -
@Krasnoiark
No problem at all.
I also learn something :)I had no idea you could do
$$files(*.cpp)
thx :)