PDA

View Full Version : error: incomplete type 'QDate' cannot be used to name a scope



nass
4th August 2006, 11:35
hello everyone,
i am trying to run an if statement with condition

if (QDate::isValid(year,month,day)) {do smth;}

yet i get the compiler error

dateinputform.ui.h:299:
error: incomplete type 'QDate' cannot be used to name a scope
make: *** [.obj/dateinputform.o] Error 1


i have of course #included <qdate.h> in my implementation..
why do i get this error?
thank you for your help.
nass

jacek
4th August 2006, 11:38
i have of course #included <qdate.h> in my implementation..
Are you 100% sure? Try adding #include <qdate.h> at the top of dateinputform.ui.h.

PS. Consider using the subclassing approach (http://doc.trolltech.com/3.3/designer-manual-6.html).

lum
4th August 2006, 11:48
Perhaps , <qdatetime.h>

jacek
4th August 2006, 12:05
Perhaps , <qdatetime.h>
Right, qdate.h is in Qt4.