#include <Qt/someheader> not portable
Thomas Braxton
brax108 at cox.net
Sat Feb 4 05:12:08 GMT 2006
On Friday 03 February 2006 17:32, Gary Greene wrote:
> On Friday 03 February 2006 6:30 pm, Alexander Neundorf wrote:
> > Hi,
> >
> > e.g. on my linux box there is a directory include/Qt/, which contains
> > among others the QtGlobal header. On some other systems (Windows I
> > think), this directory also exists, but doesn't contain new-style
> > headers, i.e. no QtGlobal, but only qglobal.h. Now on OS X with Qt build
> > as a framework this directory doesn't exist at all.
> >
> > So: don't use headers from include/Qt/, this is not portable:
> >
> > wrong:
> > #include <Qt/qwidget.h>
> >
> > right:
> > #include <QtGui/QWidget>
> > #include <QWidget>
> > #include <QtGui/qwidget.h>
> > #include <qwidget.h>
> >
> > Bye
> > Alex
>
> Correct, since these are the non-public parts of the Qt API.
That's not true, on my system Qt/QWidget and QtGui/QWidget are exactly the
same they each have the same one line
#include "qwidget.h"
IIRC the include/Qt dir has all Qt headers in one place instead of them being
separated by module.
More information about the kde-core-devel
mailing list