Logo Search packages:      
Sourcecode: qt4-x11 version File versions

void QStatusBar::addWidget ( QWidget widget,
int  stretch = 0 

Adds the given widget to this status bar, reparenting the widget if it isn't already a child of this QStatusBar object. The stretch parameter is used to compute a suitable size for the given widget as the status bar grows and shrinks. The default stretch factor is 0, i.e giving the widget a minimum of space.

The widget is located to the far left of the first permanent widget (see addPermanentWidget()) and may be obscured by temporary messages.

See also:
insertWidget(), removeWidget(), addPermanentWidget()

Definition at line 275 of file qstatusbar.cpp.

References insertWidget().

    if (!widget)
    insertWidget(d_func()->indexToLastNonPermanentWidget() + 1, widget, stretch);

Generated by  Doxygen 1.6.0   Back to index