[PyQt] QStateMachine won't start

Itay Brandes akari.il at gmail.com
Sun Jul 8 10:26:23 BST 2012


I'm now trying to change the QRectF of the button widget, but it seems like
it won't move from it's original location.
This is what I'm trying to do:

        s1.assignProperty(self.label, "text", "in state 1")
        s1.assignProperty(self.button1, "geometry", QtCore.QRectF(20, 20,
100, 50))

        s2.assignProperty(self.label, "text", "in state 2")
        s2.assignProperty(self.button1, "geometry", QtCore.QRectF(10, 10,
100, 50))

        s3.assignProperty(self.label, "text", "in state 3")
        s3.assignProperty(self.button1, "geometry", QtCore.QRectF(0, 0,
100, 50))

where am i wrong this time? thanks :)


On Sun, Jul 8, 2012 at 10:00 AM, Itay Brandes <akari.il at gmail.com> wrote:

> Thanks!
>
>
> On Sun, Jul 8, 2012 at 9:30 AM, Vincent Vande Vyvre <
> vincent.vandevyvre at swing.be> wrote:
>
>> On 08/07/12 00:37, Itay Brandes wrote:
>> > Hey,
>> > I'm trying to start a QStateMachine and seem to fail.
>> >
>> > Here is my code: http://pastebin.com/mQmyva9K
>> > Where am i wrong?
>> >
>> > Thanks.
>> >
>> >
>> > _______________________________________________
>> > PyQt mailing list    PyQt at riverbankcomputing.com
>> > http://www.riverbankcomputing.com/mailman/listinfo/pyqt
>> You must keep a reference of the machine.
>>     self.machine = QtCore.QStateMachine()
>>
>> --
>> Vincent V.V.
>> Oqapy <https://launchpad.net/oqapy> . Qarte+7
>> <https://launchpad.net/qarte+7> . PaQager <https://launchpad.net/paqager>
>>
>> _______________________________________________
>> PyQt mailing list    PyQt at riverbankcomputing.com
>> http://www.riverbankcomputing.com/mailman/listinfo/pyqt
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20120708/10d88c55/attachment.html>


More information about the PyQt mailing list