How can I get the widgets I add to QToolBar of a QMainWindow to be justified to the right?
How can I get the widgets I add to QToolBar of a QMainWindow to be justified to the right?
You can try using QToolBar::layout()->setAlignment().
But I don't guarantee that it will work. It is just an assumption.
Regards
magland (14th July 2007)
Or you could add a dummy widget with QSizePolicy::Expanding in front.
J-P Nurmi
I actually wound up using (on a QDialog, not QMainWindow):
Qt Code:
m_vBoxLayout->addLayout(m_hBoxLayout); m_vBoxLayout->addStretch(1); m_hBoxLayout->insertStretch(0, 1); m_hBoxLayout->addWidget(m_toolBar);To copy to clipboard, switch view to plain text mode
Which places my toolbar at the top/right of the dialog.
Vycke
Bookmarks