i am running a qt 4.7 embedded widget program in qt 5.
i get the following errors with headers:
#include <QtGui/QDesktopWidget>
#include <QtGui/QAbstractButton>
how can i solve it?
i am running a qt 4.7 embedded widget program in qt 5.
i get the following errors with headers:
#include <QtGui/QDesktopWidget>
#include <QtGui/QAbstractButton>
how can i solve it?
"I am running a qt 4.7 embedded widget program in qt 5."
I don't understand.
What errors?i get the following errors with headers:
#include <QtGui/QDesktopWidget>
#include <QtGui/QAbstractButton>
Do you mean you have some code written using qt4.7 and now you want to compile it with qt5? If so, google "porting qt4 to qt5".
If you have a problem, CUT and PASTE your code. Do not retype or simplify it. Give a COMPLETE and COMPILABLE example of your problem. Otherwise we are all guessing the problem from a fabrication where relevant details are often missing.
In short:
remove the module name from the includes
add
to the .pro file
You can make the second change depend on the version of Qt you are building with, the first change works for both Qt4 and Qt5
Cheers,
_
@saman_artorious: Did you bother to read the almost identical reply to the almost identical question you asked two days ago? The solution you need is posted in both places. Next time you get a similar compilation error, think about how similar it might be to these two cases before posting the same question a third time.#include <QtGui/QDesktopWidget>
#include <QtGui/QAbstractButton>
how can i solve it?
I guess I never see this problem, because I have never used the "QtGui/" qualifier. I always simply do this:#include <QtGui/QDesktopWidget>
#include <QtGui/QAbstractButton>
and adjust the include paths in the project settings.#include <QDesktopWidget>
#include <QAbstractButton>
Bookmarks