PDA

View Full Version : Spacing widgets and actions in a toolbar



indifference
5th September 2007, 23:13
Hello all,

How can i space the widgets on the toolbar?
For example in the find toolbar of Assistant, appers that the widgets are more spaced from each others, than the normal.

Thanks!

baray98
5th September 2007, 23:59
I tricked it like this



class MyToolBar: public QToolBar
{
public:
MyToolBar(QMainWindow *parent):
QToolBar(parent)
{
}
void addSpacing(int spacing)
{
QLabel *label = new QLabel(this);
addWidget(label);
label->setFixedWidth(spacing);
}
};


baray98