У меня есть небольшая проблема:Invalide использование неполного типа Qt
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)
{
}
Я получаю QDialog
/QPushButton
недействительны использование ошибки неполного типа.
Я уже включил QtWidget
в .cpp
файл, так почему он не работает?
Для большей ясности это не декларация, это декларация. – skypjack
@skypjack «forward» просто указывает на использование, не так ли? Это все еще декларация. – LogicStuff
@LogicStuff * Для ясности * –