1 Attachment(s)
Newbie question about QToolBar
Hello all,
I created a gui for my application like those of qtcreator where a QToolBar is placed on left side with several push button that switch app's central widget. Now i'd like to add another QToolBar placed just on right of the first one to create a submenu. I wrote this little snippet of code to show how QToolBar looks like:
Code:
{
Q_OBJECT
public:
void createActions();
private:
};
MainWindow
::MainWindow(QWidget *parent
){
createActions();
tb->setFloatable(false);
tb->setMovable(false);
addToolBar(Qt::LeftToolBarArea,tb);
tb->setAllowedAreas(Qt::LeftToolBarArea);
tb->setOrientation(Qt::Horizontal);
tb->addAction(quitAction);
tab->setFloatable(false);
tab->setMovable(false);
tab->setAllowedAreas(Qt::LeftToolBarArea);
tab->setOrientation(Qt::Horizontal);
addToolBar(Qt::LeftToolBarArea,tab);
tab->addAction(quitAction);
}
but QToolBar are below the other instead of one near the other. Is it possible to achive what i need, with QToolBar, and how?
I added a screenshot to show how i'd like the effect looks like.
Attachment 7747
Thanks for any advice.
Al
Re: Newbie question about QToolBar
Why are you using horizontal orientation?