ekapek
3rd July 2010, 18:13
Hi,
I need to add simple push or tool button to TabBar like in Opera or Firefox to add new tab I try with setTabButton
QPushButton *m_addButton = new QPushButton("+", this);
m_addButton->setObjectName("addButton");
connect(m_addButton, SIGNAL(clicked()), this, SLOT(newTab()));
QTabBar * tabBar = new QTabBar();
tabBar->setTabButton(0, QTabBar::RightSide, m_addButton);
but this don't work - the button is behind the tabs
How can I do this?
I need to add simple push or tool button to TabBar like in Opera or Firefox to add new tab I try with setTabButton
QPushButton *m_addButton = new QPushButton("+", this);
m_addButton->setObjectName("addButton");
connect(m_addButton, SIGNAL(clicked()), this, SLOT(newTab()));
QTabBar * tabBar = new QTabBar();
tabBar->setTabButton(0, QTabBar::RightSide, m_addButton);
but this don't work - the button is behind the tabs
How can I do this?