QT-对话框

    // 模态对话框
    QDialog * dlog1 = new QDialog(this);
    dlog1->resize(200, 100);
    dlog1->exec();

    // 非模态对话框
    QDialog * dlog2 = new QDialog(this);
    dlog2->resize(200, 100);
    dlog2->show();
    dlog2->setAttribute(Qt::WA_DeleteOnClose);
posted @ 2022-04-01 23:34  starc的miao  阅读(38)  评论(0)    收藏  举报