[PySide] sliding widgets into position
Frank Rueter | OHUfx
frank at ohufx.com
Fri Apr 27 00:08:07 CEST 2012
Thanks Tibold, I will have a look at that.
I'm still not sure how to figure out the positioning in a procedural way
Will investigate more.
On 4/26/12 6:53 PM, Tibold Kandrai wrote:
> Try to subclass QDockWidget. You will have to set it's geometry
> manually. Also if you want the widgets to pop up above the centralWidget
> than don't add the dock widgets to any layout. Simply add them with the
> main window as their parent, and raise them when you show them.
> Using this technique I managed to implement auto hiding widgets like in
> Visual Studio. It's not trivial, but it's possible.
> Actually if you don't need any of the QDockWIdget's functionality you
> can do the same with a QFrame as well. Same logic, override it's
> geometry, and don't add them to the grid layout. Adding the widgets to
> the grid layout will always push the central widget.
> On 2012-04-26 08:42, Frank Rueter | OHUfx wrote:
>> end of day for me and my brain has gone numb, so I'm probably missing
>> the obvious:
>> I'm trying to create a widget with three areas: top, middle and bottom
>> (using QFrames as place holders for now).
>> The middle frame is meant to be visible from the start containing some
>> text and other widgets, when the button is pushed, the top frame is
>> meant to slide down into view and the bottom frame is meant to slide up
>> into view, so that I'm left with a controllable vertical arrangements of
>> those three frames.
>> Here is my ugly attempt so far:
>> Things do move but I can't control the start and end positions properly
>> and the GridLayout adjusts itself when showing the extra frames, so that
>> the middle frame jumps. I have no idea how to set the size hints etc. to
>> define the start and end positions of the sliding QFrames generically
>> and avoid the jumping middle frame (might have to go with an alternative
>> approach to QGridLayout?!).
>> Any help would be greatly appreciated.
>> PySide mailing list
>> PySide at qt-project.org
> PySide mailing list
> PySide at qt-project.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the PySide