Qt状态栏添加临时消息和永久消息
MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), ui(new Ui::MainWindow) { ui->setupUi(this); ui->statusBar->showMessage("欢迎来到QT", 2000); QLabel *label = new QLabel(this); label->setText("永久显示"); ui->statusBar->addPermanentWidget(label); }
转载至:https://blog.csdn.net/tajon1226/article/details/114499156