[PySide] animate QStackedLayout?

Frank Rueter | OHUfx frank at ohufx.com
Wed Apr 4 23:53:15 CEST 2012


Hi Aaron,

thanks for your reply and especially the code snippet!
It's kinda cool and it should help me a lot to pick it apart. as you 
guessed, ultimately I am after pages filled with various widgets to 
slide in and out of view, so not sure if this solution will work. 
Nonetheless it's a great example for me to look at and learn a bit more.

Thanks everyone!!

frank

On 4/4/12 9:06 PM, Aaron Richiger wrote:
> Hello frank!
>
> I just changed your code a little with overwriting QStackedWidget. But
> for your purpose, QtStackedWidget seems the wrong widget for me, because
> it's designed to always show only one widget at a time, but what you
> want (I guess) is having a short moment where you see the old page
> sliding out and the new one already behind. You could do so by
> implementing your own StackedWidget. Please note, that my quick and
> dirty version is just a possibility to solve your issue, but there are
> probably more elegant ways to do so (QtAnimation, QtQuick) with less
> overhead. You get the code here:
>
> http://pastebin.com/BLWdryVa
>
> I hope, this gives you a rough idea of this possibility!
>
> Cheers
> aaron
>
>
>
> Am 04.04.2012 06:46, schrieb Frank Rueter | OHUfx:
>> Hi everyone,
>>
>> I'm very new to Qt/PySide and am wondering if it's possible to add an
>> animation effect to, let's say, QStackedLayout, for when the page
>> changes. I guess it'd something similar to the way the AppStore works.
>>
>> In this example I'd like to see the new button "push" the old button out
>> of view when the combobox changes:
>> http://pastebin.com/i5sFgQzE
>>
>> I'm happy to take a good ol' fashioned RTFM, I'm just having a hard time
>> finding the right bit of information out there.
>>
>> Any help would be greatly appreciated.
>>
>> Cheers,
>> frank
>> _______________________________________________
>> PySide mailing list
>> PySide at qt-project.org
>> http://lists.qt-project.org/mailman/listinfo/pyside
> _______________________________________________
> PySide mailing list
> PySide at qt-project.org
> http://lists.qt-project.org/mailman/listinfo/pyside



More information about the PySide mailing list