C++-Qt【1】-退出程序&静态调试

目前还没有发现很好的调试qt代码的方法,权且记录一下:

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

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

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

void MainWindow::on_quitButton_clicked()
{
    qDebug()<<"将要退出应用程序!";
    qApp->quit();
}

 

posted @ 2016-09-29 11:00  上帝之城  阅读(825)  评论(0编辑  收藏  举报