From: InsaneToucan
[mailto:insanetoucan@xxxxxxxxx]
Sent: Friday, May 05, 2006 9:24 PM
To: qt-interest@xxxxxxxxxxxxx
Subject: setTabBar protected?
#include <QApplication>
#include <QtGui>
#include <QIcon>
int main(int argc, char *argv[])
{
QApplication app(argc, argv);
QDialog* dialog = new QDialog;
QHBoxLayout* la = new QHBoxLayout;
dialog->setLayout(la);
QTabWidget tab;
QTabBar tabbar;
la->addWidget(&tab);
QToolButton* closeTabButton = new QToolButton(dialog);
tab.setCornerWidget( closeTabButton, Qt::TopRightCorner );
QLabel l;
l.setText("Test1");
tab.setTabBar(&tabbar);
tab.addTab(&l, "test1");
dialog->show();
return app.exec();
}
The code above errors with:
error: `void QTabWidget::setTabBar(QTabBar*)' is protected
error: within this context
Is this a bug or my oversight?
TIA