QObjectList porting problem
From QT3 to QT4, QObjectList should have changed.
How can I convert the following QT3 code to QT4?
Code:
QObjectList *l = this->queryList( "TableButton" ); // get all its children which is TableButton
QObjectListIt it( *l ); // iterate over the buttons
while ( it.current() != 0 )
{
// for each found button...
((TableButton *)(it.current()))->close( TRUE );
++it;
}
delete l;
Thanks!
Re: QObjectList porting problem
Code:
foreach(TableButton *tb, findChildren<TableButton*>())
tb->close(TRUE);
Shorter than before, right?
HTH