[Qt-interest] problem in QWidget type cast

Chandru... sekarwagmare at gmail.com
Tue Aug 11 13:07:12 CEST 2009


hi friends,

i got a problem in QList
as i subject all my object in a Widget class to a QList by

"*QList wlist;
 wlist = embed->findChildren<QWidget *>()*;"

this list have QLabel, QTextEdit, etc ..
but all were typecast to QWidget in the QList ..

now i want to access a label in wlist.at(2) .. which currently returning a
QWidget pointer ..

where to use qobject_cast?
how to call a typical QLabel function ex:setText on the QList item with type
cast ..

please help ..


-- 
WAGMARE
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20090811/ef8d40b0/attachment.html 


More information about the Qt-interest-old mailing list