PDA

View Full Version : Compiling Demos and QSqlRelationalDelegate’



jon2718
24th June 2011, 05:31
HI,

I am trying to compile the demos from QT 4.7 on mac os snow leopard.
I type:
qmake 4.7.pro -spec macx-g++
make

Then I get:

In file included from books/bookdelegate.cpp:42:
books/bookdelegate.h:48:34: error: QSqlRelationalDelegate: No such file or directory
In file included from books/bookdelegate.cpp:42:
books/bookdelegate.h:53: error: expected class-name before ‘{’ token
books/bookdelegate.h:57: error: expected ‘,’ or ‘...’ before ‘&’ token
books/bookdelegate.h:58: error: ISO C++ forbids declaration of ‘QStyleOptionViewItem’ with no type
books/bookdelegate.h:60: error: expected ‘,’ or ‘...’ before ‘&’ token
books/bookdelegate.h:60: error: ISO C++ forbids declaration of ‘QStyleOptionViewItem’ with no type
books/bookdelegate.h:63: error: expected ‘,’ or ‘...’ before ‘&’ token
books/bookdelegate.h:64: error: ISO C++ forbids declaration of ‘QStyleOptionViewItem’ with no type
books/bookdelegate.h:66: error: expected ‘,’ or ‘...’ before ‘&’ token
books/bookdelegate.h:67: error: ISO C++ forbids declaration of ‘QStyleOptionViewItem’ with no type
books/bookdelegate.cpp: In constructor ‘BookDelegate::BookDelegate(QObject*)â€℠¢:
books/bookdelegate.cpp:47: error: class ‘BookDelegate’ does not have any field named ‘QSqlRelationalDelegate’
books/bookdelegate.cpp: At global scope:
books/bookdelegate.cpp:52: error: prototype for ‘void BookDelegate::paint(QPainter*, const QStyleOptionViewItem&, const QModelIndex&) const’ does not match any in class ‘BookDelegate’
books/bookdelegate.h:58: error: candidate is: void BookDelegate::paint(QPainter*, int) const
books/bookdelegate.cpp: In member function ‘void BookDelegate::paint(QPainter*, const QStyleOptionViewItem&, const QModelIndex&) const’:
books/bookdelegate.cpp:57: error: ‘QSqlRelationalDelegate’ has not been declared
books/bookdelegate.cpp:75: error: ‘drawFocus’ was not declared in this scope
books/bookdelegate.cpp: At global scope:
books/bookdelegate.cpp:86: error: prototype for ‘QSize BookDelegate::sizeHint(const QStyleOptionViewItem&, const QModelIndex&) const’ does not match any in class ‘BookDelegate’
books/bookdelegate.h:60: error: candidate is: QSize BookDelegate::sizeHint(int) const
books/bookdelegate.cpp: In member function ‘QSize BookDelegate::sizeHint(const QStyleOptionViewItem&, const QModelIndex&) const’:
books/bookdelegate.cpp:91: error: ‘QSqlRelationalDelegate’ has not been declared
books/bookdelegate.cpp: At global scope:
books/bookdelegate.cpp:96: error: prototype for ‘bool BookDelegate::editorEvent(QEvent*, QAbstractItemModel*, const QStyleOptionViewItem&, const QModelIndex&)’ does not match any in class ‘BookDelegate’
books/bookdelegate.h:64: error: candidate is: bool BookDelegate::editorEvent(QEvent*, QAbstractItemModel*, int)
books/bookdelegate.cpp: In member function ‘bool BookDelegate::editorEvent(QEvent*, QAbstractItemModel*, const QStyleOptionViewItem&, const QModelIndex&)’:
books/bookdelegate.cpp:99: error: ‘QSqlRelationalDelegate’ has not been declared
books/bookdelegate.cpp: At global scope:
books/bookdelegate.cpp:113: error: prototype for ‘QWidget* BookDelegate::createEditor(QWidget*, const QStyleOptionViewItem&, const QModelIndex&) const’ does not match any in class ‘BookDelegate’
books/bookdelegate.h:67: error: candidate is: QWidget* BookDelegate::createEditor(QWidget*, int) const
books/bookdelegate.cpp: In member function ‘QWidget* BookDelegate::createEditor(QWidget*, const QStyleOptionViewItem&, const QModelIndex&) const’:
books/bookdelegate.cpp:116: error: ‘QSqlRelationalDelegate’ has not been declared
make: *** [bookdelegate.o] Error 1


Does anyone know what is wrong?

Thanks in advance

-Jon