我有一個類的Qt不能加載臨時狀態消息
class Window: public QMainWindow {
// ...
private:
Ui::MainWindow ui;
}
凡UI ::主窗口是自動生成的ui_mainwindow.h爲mainwindow.ui形式。 在我的構造
Window::Window(QWidget *parent):
QMainWindow(parent)
{
ui.setupUi(this);
ui.retranslateUi(this);
ui.statusbar->message(tr("Hello"), 3000); // here is the error
}
它說消息無法得到解決。。那麼我怎麼能在這裏設置一個臨時狀態?