[PyQt] QStateMachine won't start
Vincent Vande Vyvre
vincent.vandevyvre at swing.be
Sun Jul 8 10:46:55 BST 2012
On 08/07/12 11:26, Itay Brandes wrote:
> 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
> <mailto:akari.il at gmail.com>> wrote:
>
> Thanks!
>
>
> On Sun, Jul 8, 2012 at 9:30 AM, Vincent Vande Vyvre
> <vincent.vandevyvre at swing.be <mailto: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
> <mailto: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
> <mailto:PyQt at riverbankcomputing.com>
> http://www.riverbankcomputing.com/mailman/listinfo/pyqt
>
>
>
Because your button is into a layout.
Change his geometry has no effect.
--
Vincent V.V.
Oqapy <https://launchpad.net/oqapy> . Qarte+7
<https://launchpad.net/qarte+7> . PaQager <https://launchpad.net/paqager>
More information about the PyQt
mailing list