📜  qt 弹出窗口 - C++ 代码示例

📅  最后修改于: 2022-03-11 14:44:51.997000             🧑  作者: Mango

代码示例1
/** 
 * You can use a QMessageBox like this:
 * int output = QMessageBox::icon(this, tr("Title"), tr("content"),
 *                              QMessageBox::button, QMessageBox::defaultButton);
 */
//for example :
int ret = QMessageBox::warning(this, tr("My Application"),
                               tr("The document has been modified.\n"
                                  "Do you want to save your changes?"),
                               QMessageBox::Save | QMessageBox::Discard
                               | QMessageBox::Cancel,
                               QMessageBox::Save);