help! is there errors in codes copied from book ?
I’m a total greenhand on qt,and I lent some books form library. I copied the “helloworld” code from the book to my QTcreator, and it ran perfectly. But when I started to build some more conplex code copied from the book, it start to make errors.
this is the code:
- //addressbook.h
- #ifndef ADDRESSBOOK_H
- #define ADDRESSBOOK_H
- #include <QWidget>
- class QLineEdit;
- {
- Q_OBJECT
- public:
- private:
- QLineEditor * nameline;
- QTextEditor * addresstext;
- };
- #endif // ADDRESSBOOK_H
It said the “QLineEditor” (and lots of other things) need declaeration in the scope. Is there missing some lib or header?
Edit: please use @ tags around code sections; Andre
7 replies
You must log in to post a reply. Not a member yet? Register here!




