[PyKDE] 'Casting' in PyQT

Robin Summerhill robinsummerhill at cyantechnology.com
Thu May 9 13:29:00 BST 2002


Hi,

I'm guessing that the answer is 'no' but can I do something like the
following:

myTextEdit = aWidget.child("TextEdit1")

(using the 'child' method of QObject inherited by QWidget - this returns a
QObject* in C++)

and then use 'myTextEdit' as fully-fledged QTextEdit instance rather than a
rather-feeble QObject instance (i.e. the equivalent of doing a
dynamic_cast<QTextEdit*>(myTextEdit) in C++)

Robin Summerhill




More information about the PyQt mailing list