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

posted @ 2021-11-30 17:22  浅笑19  阅读(152)  评论(0编辑  收藏  举报