刚刚接触QT 想要实现一个点击按钮切换界面的功能
按照http://blog.csdn.net/wc7620awjh/article/details/8574131的步骤做了但是编译通不过
麻烦给看看
dialog1.h
#ifndef DIALOG1_H
#define DIALOG1_H
#include <QDialog>
namespace Ui {
class Dialog1;
}
class Dialog1 : public QDialog
{
Q_OBJECT
public:
explicit Dialog1(QWidget *parent = 0);
~Dialog1();
private:
Ui::Dialog1 *ui;
};
#endif // DIALOG1_H
dialog1.cpp
#include "dialog1.h"
#include "ui_dialog1.h"
Dialog1::Dialog1(QWidget *parent) :
QDialog(parent),
ui(new Ui::Dialog1)
{
ui->setupUi(this);
}
Dialog1::~Dialog1()
{
delete ui;
}
void Dialog1::on_pushButton_clicked()
{
this->close();
}
------解决思路----------------------
.h里没声明on_pushButton_clicked()
C++没基础最好别动Qt