I am getting a wierd compiler error in this code:
const QObjectList *l = boxLayout->children();
for ( unsigned int i = topLine; i != l->count(); i++ )
{
if( !((PositionElementLine*)obj)->isChecked() )
firstUnchecked = i;
}
const QObjectList *l = boxLayout->children();
for ( unsigned int i = topLine; i != l->count(); i++ )
{
QObject *obj = l->at(i);
if( !((PositionElementLine*)obj)->isChecked() )
firstUnchecked = i;
}
To copy to clipboard, switch view to plain text mode
gcc objects to line 5 with this message:
error: passing 'const QObjectList' as 'this' argument of 'type* QPtrList<type>::at(uint) [with type = QObject]' discards qualifiers
Bookmarks