Qt World Summit: Register Today!

[Solved] Difference between #include <Qt/qgroupbox.h> and #include <QGroupBox>

  • Hi ,

    What is the difference between #include <Qt/qgroupbox.h> and #include <QGroupBox>. Are these header files different? They seem to do the same thing.


  • You can see into the QT_PATH/inclue folder. There are the Qt/qgroupbox.h header and the QtGui/QGroupBox header inside.
    The first file contents:
    @#include "../QtGui/qgroupbox.h"@
    The second file contents:
    @#include "qgroupbox.h"@
    So both variants are the same.

  • They're both quite the same. #include <QGroupBox> resp. #include <QtGui/QGroupBox> is the recommended variant and more "C++ style".

Log in to reply