I have a little problem :
finddialog.h
#ifndef FINDDIALOG_H
#define FINDDIALOG_H
class QDialog;
class QWidget;
class QLineEdit;
class QPushButton;
class QCheckBox;
class QLabel;
class FindDialog : public QDialog
{
Q_OBJECT
public:
FindDialog(QWidget *parent);
private slots:
void findClicked();
void enableFindButton(const QString &text);
signals :
void findNext(const QString &str, Qt::CaseSensitivity cs);
void findPrev(const QString &str, Qt::CaseSensitivity cs);
private:
QLabel *findLabel;
QLineEdit *textEdit;
QCheckBox *caseCheckBox;
QCheckBox *backwCheckBox;
QPushButton *findButton;
QPushButton *closeButton;
};
#endif // FINDDIALOG_H
finddialog.c
#include <QtWidgets>
#include "finddialog.h"
FindDialog::FindDialog(QWidget *parent) : QDialog(parent)
{
QPushButton *button = new QPushButton(this);
}
void FindDialog::findClicked()
{
}
void FindDialog::enableFindButton(const QString &text)
{
}
I receive a QDialog
/QPushButton
invalid use of incomplete type error.
I have already included QtWidget
in .cpp
file so why is it not working?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…