Hi all,
I am new to Qt and wrote a small code which uses foreach, here is the snippet of the code
void GroupBox::setCollapsed(bool collapsed)
{
QObject *o;
foreach (o, children()){
if (o->isWidgetType())
((QWidget *)o)->setVisible(collapsed);
}
setFlat(collapsed);
}
and it is giving me this error while compiling
GroupBox.cpp:40: error: 'foreach' was not declared in this scope
Do we need to include any *.pro to invoke QT Preprocessor as foreach is not a function of C++. Please let me know
- smk
Bookmarks