Hi, Thanks a lot, it works now with QTest.mouseClick(self.dialog.textButton, Qt.Qt.LeftButton) But now I don't know how I can simulate a text entry in a QtGui.QLineEdit with QtTest module. I tried to test it with QTest.keyClicks(self.dialog.textEnter,"test") but nothing happened althought the dialog works !
Thanks in advanced. Sabrina. 2007/3/29, Andreas Pakulat <[EMAIL PROTECTED]>:
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 2nd. Andreas -- Green light in A.M. for new projects. Red light in P.M. for traffic tickets. _______________________________________________ PyQt mailing list [email protected] http://www.riverbankcomputing.com/mailman/listinfo/pyqt
_______________________________________________ PyQt mailing list [email protected] http://www.riverbankcomputing.com/mailman/listinfo/pyqt
