*** GMX Spamverdacht *** [PyQt] PyQt4 : problem with QtTest

Andreas Pakulat apaku at gmx.de
Thu Mar 29 17:11:22 BST 2007

On 29.03.07 17:41:01, Sabrina Demagny wrote:
> Hi,
> I'm using PyQt4 to develop a GUI and I would like to use QtTest module for
> my unit test. However, it doesn't work.
> I would like to simulate a mouse click on my QtGui.QPushButton but in the
> QTest class, the method's argument is a Qt.MouseButton.
> QTest.mouseClick(QWidget widget, Qt.MouseButton
> button,Qt.KeyboardModifiersstateKey = 0, QPoint pos = QPoint(), int
> delay = -1)

QPushButton is a QWidget ;) So you pass your pushbutton as first
argument and the proper mouse button (i.e. left, right, middle) as the


Green light in A.M. for new projects.  Red light in P.M. for traffic tickets.

More information about the PyQt mailing list