[PyQt] Help with QStateMachine and animations

David Boddie david at boddie.org.uk
Tue Apr 5 23:46:08 BST 2011


On Tue, 5 Apr 2011 00:05:44 +0000, Demetrius Cassidy wrote:
>
> I am trying to animate a QTableView moving off-screen from center (0,0),
> which is replaced by a QGroupBox which slides to 0,0 from off-screen inside
> my QStackedWidget.
>
> I am using a QStateMachine which contains two states, and basically when
> the state 'stateProceeding' is entered, only the QGroupBox is animated -
> the QTableView just seems to flash once, then the QStackedWidget index is
> changed and QGroupBox is animated. Similarly, when it enters the
> stateReleased state, the opposite happens - QTableView is animated, but not
> the QGroupBox.

[...]

> self._stateMachine.addDefaultAnimation(self._queueAnimation)
> self._stateMachine.addDefaultAnimation(self._rtpAnimation)

Have you tried setting the animations on the transitions themselves instead
of using default animations? Did this make a difference?

David


More information about the PyQt mailing list