[commonqt-devel] Coerce object to Qt type

Viktor Ivakin ya.programmerko at yandex.ru
Thu Apr 12 21:58:19 UTC 2012


Hello!

How can one coerce the Qt object to the some Qt type?

(coerce qt-object ???)

What should I write instead of "???". How can I specify the Qt type here?
When I do (#_children parent) where parent is qt form, I have a list of 
object of some qt types. The one I need are in this list, but his type 
is QWidget while it should be QTableView. In C++ I can write

QTableView *tv = parent->findChild<QTableView *>("view1");

or

QTableView *tv = qFindChild<QTableView *>(parent, "view1")

but I have no clue how can do this in commonqt.

Thanks.




More information about the commonqt-devel mailing list