PDA

View Full Version : QtGui/QAbstractButton no such file or directory



saman_artorious
21st February 2013, 10:00
I compiled my program with qt 4.7, but when I load it in qt 5.0.1 i receive the following error for one of the header


QtGui/QAbstractButton no such file or directory

include does not have such header at all. you have any solution to fix this?

Lykurg
21st February 2013, 10:06
Have you QT += widgets?

saman_artorious
21st February 2013, 10:11
Have you QT += widgets?

yes,

QT += core gui svg
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets


is this relevant to adding qt 4.8.4 or 4.7.4 libraries to qt 5.0.1 to support it? if yes, how can I do it wit patch?
(in case qt 5 does not support these headers at all)

Lykurg
21st February 2013, 10:18
... and it should be of course
#include <QtWidgets/QAbstractButton>!

saman_artorious
21st February 2013, 10:21
... and it should be of course
#include <QtWidgets/QAbstractButton>!

could you tell why it is so different in qt 5?

Lykurg
21st February 2013, 11:45
It is not that different, they just have put all widget stuff to an extra module. That's all.

anda_skoa
22nd February 2013, 14:15
If you just remove the unnecessary module name from the include, then there is no change at all between Qt4 and Qt5
I.e.


#include <QAbstractButton>


Cheers,
_