I want to subclass the "QStackedWidget" class to add some public slots but when I add its header and source to my Qt project, my project can't be built completely and after showing many compiling errors and warnings, Qt gets crashed.
This is my QStackedWidget-inherited class header below:
#ifndef QSTACKEDWIDGETV2_H
#define QSTACKEDWIDGETV2_H
#include <QWidget>
#include <QStackedWidget>
class QStackedWidgetV2 : public QStackedWidget
{
public slots:
void GoToNextPage();
void GoToBackPage();
void JumpToPage(qint32 index);
public:
QStackedWidgetV2();
~QStackedWidgetV2();
}
#endif // QStackedWidgetV2
And these are some of the given compiling and warning errors. However, Qt showed me a lot of other errors but they were similar: