[PyKDE] controlling C++/Qt apps with PyQt

Austin Bingham abingham at arlut.utexas.edu
Wed Nov 28 21:48:17 GMT 2001


I'm working on some python extensions for automating C++/Qt applications
(i.e. for stress-testing). The extension provides facilities for getting
QWidget pointers by name from the QApplication's widget tree. If this
extension is used in the context of a python interpreter embedded in the
C++ application, the python objects have access to the widgets in the
application.

What I'm curious about is if PyQt could be used to then manipulate these
QWidget pointers. From what I've seen of PyQt, it is designed for building
Qt applications in python. I would like to be able to, in a sense,
is attach PyQt objects to existing QWidget pointers (i.e. the ones
extracted from the C++ process) so that I could leverage all of the hard
work that's aready gone into proxying Qt in python. It's more-or-less the
reverse of what PyQt seems to be designed for.

I've noticed that most (all?) of the PyQt widget-based classes have a
constructor that takes a QWidget*, and this seems like a reasonable way to
get what I am looking for. What I'd like to find out is if I'm going to
run head-frist into design assumptions in the PyQt module. Any thoughts on
this would be greatly appreciated.

Austin Bingham
Applied Research Laboratories
abingham at arlut.utexas.edu





More information about the PyQt mailing list