Hi to all,
I want to subclass qTabWidget for accessing to qTabbar member for adding some tab with a push button.
I’ve followed this old discussion [qt-project.org].
Now, I want to define a slot in my custom widget for removing the tab with close button.
The subclass is now the following:
class TabWidget : public QTabWidget {
Q_OBJECT
public:
TabWidget();
TabWidget(QWidget *parent);
~TabWidget();
QTabBar *tabBar() const;
public slots:
void deleteTab(int index);
};
But during the compile process I obtain this errors:
..C2/TabWidget.cpp:10: undefined reference to `vtable for TabWidget'
..C2/TabWidget.cpp:10: undefined reference to `vtable for TabWidget'
..C2/TabWidget.cpp:12: undefined reference to `vtable for TabWidget'
..C2/TabWidget.cpp:12: undefined reference to `vtable for TabWidget'
Where’s the problem? I’ve used two separate files (.cpp + .h) and I’ve executed qmake.
Thank you so much
↧