why do I receive error when I do not #include for example QToolButton , but rather go for its forward class declaration?
Qt Code:
#ifndef PLAYVIDEO_H #define PLAYVIDEO_H #include <QWidget> class QToolButton; class QGridLayout; class QHBoxLayout; class QVBoxLayout; { Q_OBJECT public: private: void createButtons(); void createControls(); QToolButton *playButton; QToolButton *pauseButton; QToolButton *stopButton; QGridLayout *controlsLayout; QHBoxLayout *buttonsLayout; QVBoxLayout *mainLayout; }; #endif // PLAYVIDEO_HTo copy to clipboard, switch view to plain text mode
error: forward declaration of ‘struct QToolButton’
Bookmarks