QT中点击按钮,弹出对话框

QT中点击按钮,弹出对话框

作者:fly 发布于:2014-3-14 15:49 分类:Linux


版权声明:本文系www.forwhat.cn原创 ,尊重作者劳动,转载请标明出处。本文转载自www.forwhat.cn谢谢




#include "mainwindow.h"
#include "ui_mainwindow.h"
#include <QMessageBox>

MainWindow::MainWindow(QWidget *parent) :
    QMainWindow(parent),
    ui(new Ui::MainWindow)
{
    ui->setupUi(this);
}

MainWindow::~MainWindow()
{
    delete ui;
}

void MainWindow::on_pushButton_clicked()
{
    QMessageBox::about(this,tr("message title"),tr("message body"));
}


发表评论:

 
Powered by emlog sitemap