前提 :必須沒有刪除狀態欄ui
//顯示一段時間 狀態欄文本google
// ui->statusBar->showMessage(tr("welcom to notepad"),20000);orm
//永久顯示狀態欄文本
statulab=new QLabel;
statulab->setMinimumSize(160,30);
statulab->setFrameShape(QFrame::WinPanel);
statulab->setFrameShadow(QFrame::Sunken);
ui->statusBar->addWidget(statulab);
statulab->setText("Welcome to use notepad");get
//狀態欄超連接
QLabel *permanent=new QLabel;
permanent->setFrameStyle(QFrame::Box|QFrame::Sunken);
permanent->setText(tr("<a href=\"https://google.com\">google.com</a>"));
permanent->setTextFormat(Qt::RichText);
permanent->setOpenExternalLinks(true);
ui->statusBar->addPermanentWidget(permanent);im