#include <Qt/someheader> not portable

Alexander Neundorf neundorf at kde.org
Fri Feb 3 23:30:04 GMT 2006


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:

#include <Qt/qwidget.h> 

#include <QtGui/QWidget> 
#include <QWidget> 
#include <QtGui/qwidget.h> 
#include <qwidget.h> 

Work: alexander.neundorf AT jenoptik.com - http://www.jenoptik-los.de
Home: neundorf AT kde.org                - http://www.kde.org
      alex AT neundorf.net               - http://www.neundorf.net

More information about the kde-core-devel mailing list