Hi,
I have the following code in qt3 that I've been trying unsuccessfully to port to qt4 using qlist and findchildren. How would the following translate to qt4?
QObjectList *l2 = MyTabPage->queryList("QPushButton","leHS*",true,false);
QObjectListIt it4( *l2 ); // iterate over the buttons
while ( (obj2 = it4.current()) != 0 ) {
qDebug(" Connecting \"%s\"",obj2->name());
connect( ((QLineEdit *)obj2
),
SIGNAL(NumberChanged
(double)),
SLOT(CalcProceeds
()) );
// for each found object...
++it4;
}
QObject *obj2;
QObjectList *l2 = MyTabPage->queryList("QPushButton","leHS*",true,false);
QObjectListIt it4( *l2 ); // iterate over the buttons
while ( (obj2 = it4.current()) != 0 ) {
qDebug(" Connecting \"%s\"",obj2->name());
connect( ((QLineEdit *)obj2), SIGNAL(NumberChanged(double)),SLOT(CalcProceeds()) );
// for each found object...
++it4;
}
To copy to clipboard, switch view to plain text mode
Thanks!
Gene
Bookmarks