#include <QtGui/qdirmodel.h> #ifndef QDIRMODEL_H #ifndef QT_NO_DIRMODEL class QDirModel: public QAbstractItemModel{ /* Some contents are skipped to improve readability */ public: enum Roles{ /* ... */ FilePathRole = 33, /* ... */ }; /* ... */ }; #endif // QT_NO_DIRMODEL #endif // QDIRMODEL_H