[prev in list] [next in list] [prev in thread] [next in thread] 

List:       pykde
Subject:    Re: *** GMX Spamverdacht *** [PyQt] PyQt4 : problem with QtTest
From:       "Sabrina Demagny" <sabrina.demagny () gmail ! com>
Date:       2007-03-30 14:39:19
Message-ID: d598b63e0703300739w7aa5aa0fs8d8a453124007825 () mail ! gmail ! com
[Download RAW message or body]

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 <apaku@gmx.de>:
> 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    PyQt@riverbankcomputing.com
> http://www.riverbankcomputing.com/mailman/listinfo/pyqt
>
_______________________________________________
PyQt mailing list    PyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic