Hi, I want to add some code to addTab. Therefore I tried to build an inherit class of QTabWidget. What am I doing wrong?
Thx -,
Chris
test.h
#ifndef TEST_H
#define TEST_H
#include <QtGui/QTabWidget>
{
Q_OBJECT
public:
~CTest();
int addTab
(QWidget* ,
const QString
& );
};
#endif // TEST_H
#ifndef TEST_H
#define TEST_H
#include <QtGui/QTabWidget>
class CTest : public QTabWidget
{
Q_OBJECT
public:
CTest(QWidget* parent = 0);
~CTest();
int addTab(QWidget* , const QString& );
};
#endif // TEST_H
To copy to clipboard, switch view to plain text mode
test.cpp
#include "test.h"
#include <QtGui>
{
}
CTest::~CTest()
{
}
int CTest
::addTab(QWidget* page,
const QString
& label
) {
//some aditional code
}
#include "test.h"
#include <QtGui>
CTest::CTest(QWidget* parent)
: QTabWidget(parent)
{
}
CTest::~CTest()
{
}
int CTest::addTab(QWidget* page, const QString& label)
{
//some aditional code
return QTabWidget::addTab(page, label);
}
To copy to clipboard, switch view to plain text mode
Bookmarks