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

void QStatusBar::showMessage ( const QString message,
int  timeout = 0 
) [slot]

Hides the normal status indications and displays the given message for the specified number of milli-seconds ({timeout}). If {timeout} is 0 (default), the {message} remains displayed until the clearMessage() slot is called or until the showMessage() slot is called again to change the message.

Note that showMessage() is called to show temporary explanations of tool tip texts, so passing a {timeout} of 0 is not sufficient to display a {permanent message}{permanent message}.

See also:
messageChanged(), currentMessage(), clearMessage()

Definition at line 553 of file qstatusbar.cpp.

References clearMessage(), QObject::connect(), and hideOrShow().

Referenced by MainWindow::changeCurrent(), MainWindow::createStatusBar(), MainWindow::loadFile(), MainWindow::mousePressEvent(), MainWindow::print(), MainWindow::saveFile(), and Q3Action::showStatusText().

    if (d->tempItem == message)

    d->tempItem = message;

    if (timeout > 0) {
        if (!d->timer) {
            d->timer = new QTimer(this);
            connect(d->timer, SIGNAL(timeout()), this, SLOT(clearMessage()));
    } else if (d->timer) {
        delete d->timer;
        d->timer = 0;


Generated by  Doxygen 1.6.0   Back to index