在这本书中,第二章中的对话框(findialog)实例,
void findNext(const QString &str,QT::CaseSensitivity cs);
void findPrevious(const QString &str,QT::CaseSensitivity cs);始终报错?
提示是
Multiple markers at this line
- `CaseSensitivity' has not been declared
- ISO C++ forbids declaration of `cs' with
no type
- `QT' has not been declared
没有声明吗?例子并没有说啊!
#ifndef FINDDIALOG_H
#define FINDDIALOG_H
#include<QDialog>
class QCheckBox;
class QLabel;
class QLineEdit;
class QPushButton;
class FindDialog:public QDialog
{
Q_OBJECT
public:
FindDialog(QWidget *parent=0);
signals:
void findNext(const QString &str,QT::CaseSensitivity cs);
void findPrevious(const QString &str,QT::CaseSensitivity cs);
private slots:
void findClicked();
void enableFindButton(const QString &text);
private:
QLabel *label;
QLineEdit *lineEdit;
QCheckBox *caseCheckBox;
QCheckBox *backwardCheckBox;
QPushButton *findButton;
QPushButton *closeButton;
};
#endif