Reputation: 14063
I have a class
class Window: public QMainWindow {
// ...
private:
Ui::MainWindow ui;
}
Where Ui::MainWindow is the auto generated ui_mainwindow.h for the mainwindow.ui form. In my constructor
Window::Window(QWidget *parent):
QMainWindow(parent)
{
ui.setupUi(this);
ui.retranslateUi(this);
ui.statusbar->message(tr("Hello"), 3000); // here is the error
}
It says message could not be resolved.. So how can I set a temporary status here?
Upvotes: 2
Views: 97
Reputation: 4276
ui.statusbar->
showMessage(tr("Hello"), 3000); // here is the error
Upvotes: 2
Reputation: 1499
it's void QStatusBar::showMessage ( const QString & message, int timeout = 0 )
. Not only message
Upvotes: 1