On Tuesday 31 March 2009 16:49:00 Rendezvous wrote: > How does one type cast in PyQt4? For example, a QObject to a QAction?
For what do you need type-casting in python? To check whether the argument is of the right type? Take a look at isinstance(). Otherwise just call the QAction-functions you want, if it is a QAction all is fine, if it isn't, you get an error. Either this is a real error because the object should always be a QAction, or you have to do input-checking with isinstance() before doing the real work in your function... Have fun, Arnold
signature.asc
Description: This is a digitally signed message part.
_______________________________________________ PyQt mailing list [email protected] http://www.riverbankcomputing.com/mailman/listinfo/pyqt
