我有一个类的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
}
它说消息无法得到解决。。那么我怎么能在这里设置一个临时状态?