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.