Is there a way by which I can put few widgets right aligned and few widgets left aligned in a QToolBar with the some eampty space in the center of the toolbar?
Thanks
Is there a way by which I can put few widgets right aligned and few widgets left aligned in a QToolBar with the some eampty space in the center of the toolbar?
Thanks
Mithin
www.mithin.in
Sure, QToolBar allows any widget to be inserted.
Qt Code:
// a dummy widget taking as much horizontal space as possible toolBar->addAction("Action 1"); toolBar->addWidget(spacer); // a "spacer" between actions toolBar->addAction("Action 2");To copy to clipboard, switch view to plain text mode
J-P Nurmi
Oh, I did not notice that. In that case, can I use QLayout to place widgets on tool bar?
Mithin
www.mithin.in
Yep, you can. Just wrap the layout inside a single widget which you place in a tool bar.Originally Posted by munna
J-P Nurmi
Bookmarks