如何从Qt中的Qt MessageBox中删除标题栏?
我经历过
QMessageBox::QMessageBox(Icon icon, const QString & title, const QString & text, StandardButtons buttons, QWidget * parent, Qt::WindowFlags f)
Run Code Online (Sandbox Code Playgroud)
但是如何使用这个.任何例子?任何帮助表示赞赏.谢谢.
这是QMessageBox的构造函数.您可以像使用其他任何构造一样使用它,例如:
QMessageBox msgBox(QMessageBox::Question,
"This is the title",
"This is the text",
QMessageBox::Yes | QMessageBox::No, this,
Qt::FramelessWindowHint);
msgBox.exec();
Run Code Online (Sandbox Code Playgroud)
要么
QMessageBox* msgBox = new QMessageBox(QMessageBox::Question,
"This is the title",
"This is the text",
QMessageBox::Yes | QMessageBox::No, this,
Qt::FramelessWindowHint);
msgBox->exec();
Run Code Online (Sandbox Code Playgroud)
在这种情况下,this是一个父窗口(QMainWindow实例)
| 归档时间: |
|
| 查看次数: |
5920 次 |
| 最近记录: |