there is snippet of code how trolls do this in Assistant
...
ui.tab->setCornerWidget(newTabButton, Qt::TopLeftCorner);
newTabButton->setCursor(Qt::ArrowCursor);
newTabButton->setAutoRaise(true);
QObject::connect(newTabButton,
SIGNAL(clicked
()),
this,
SLOT(newTab
()));
newTabButton->setToolTip(tr("Add page"));
...
...
QToolButton *newTabButton = new QToolButton(this);
ui.tab->setCornerWidget(newTabButton, Qt::TopLeftCorner);
newTabButton->setCursor(Qt::ArrowCursor);
newTabButton->setAutoRaise(true);
newTabButton->setIcon(QIcon(ImageLocation + QLatin1String("addtab.png")));
QObject::connect(newTabButton, SIGNAL(clicked()), this, SLOT(newTab()));
newTabButton->setToolTip(tr("Add page"));
...
To copy to clipboard, switch view to plain text mode
Bookmarks