Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

[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.

    Thanks!



  • 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