zoukankan      html  css  js  c++  java
  • Qt学习笔记 QMessageBox

    Qt的几种MessageBox

    1.Infomation类型

    QMessageBox::information(this,tr("hello"),tr("title"));

    2.Question类型

        QMessageBox::StandardButton returnBtn;
        returnBtn = QMessageBox::question(this,tr("hello have problem?"),tr("error!"),QMessageBox::Yes|QMessageBox::No);
        if(returnBtn==QMessageBox::Yes)
        {
            QMessageBox::information(this,tr("Yes!"),tr("error"));
        }

    3.Warning类型

    QMessageBox::warning(this,tr("warning!"),tr("warning!"));

    4.自定义类型

        QMessageBox msg;
        msg.setText("customer!");
        msg.setWindowTitle(tr("titleHaHa"));
        msg.setStandardButtons(QMessageBox::Ok|QMessageBox::Cancel);
        msg.exec();
  • 相关阅读:
    Scala-文件操作
    python-数字
    python-访问模型
    scala-包
    Scala对象
    Scala-类
    sql存储过程
    sql视图
    sql基本语句
    sql中级语句
  • 原文地址:https://www.cnblogs.com/li-peng/p/3652428.html
Copyright © 2011-2022 走看看