<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
Hi Tibold,<br>
<br>
I'm starting to go through your example code and was wondering why
it's necessary to subclass QFrame and re-implement the resizeEvent
for "CentralFrame"?!<br>
To my novice eye it looks like what you did here should be working
for QFrame out of the box, but it doesn't.<br>
<br>
Would you mind explaining?<br>
<br>
Cheers and thanks again for this example!<br>
frank<br>
<br>
On 4/27/12 5:47 PM, Tibold Kandrai wrote:
<blockquote cite="mid:4F9A32FB.1080706@gmail.com" type="cite">
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
Try this out ;)<br>
<a moz-do-not-send="true" href="http://pastebin.com/a04tvY0U">http://pastebin.com/a04tvY0U</a><br>
<br>
Cheers,<br>
Tibold<br>
<br>
On 2012-04-27 02:11, Frank Rueter | OHUfx wrote:
<blockquote cite="mid:4F99E414.7010203@ohufx.com" type="cite">
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
So I've followed Tibold's advice and sorted out some other ugly
stuff and am a bit closer.<br>
My problem now is that, because I am not adding the top and
bottom frames to the layout anymore (to avoid the middle frame
shifting), I now can't get the right size and position relative
to the centre frame.<br>
<br>
This is what I have now a bit cleaned up and with comments:<br>
<a moz-do-not-send="true" class="moz-txt-link-freetext"
href="http://pastebin.com/wrUX5Ce0">http://pastebin.com/wrUX5Ce0</a><br>
<br>
By making the middle frame the parent to the top and bottom
frames they line up to it now in the upper left corner - cool,
one step forward.<br>
But I can't get the top and bottom frames to have the same width
as the parent and also don't know how to control the position
properly so that the bottom frame is always positioned in the
bottom left corner of the centre frame.<br>
The size policy isn't inherited either which I'm a bit clueless
a bout too.<br>
<br>
Sorry for the noob questions but have looked online for
tutorials on this sort of positioning to no avail.<br>
<br>
Thanks in advance for any help!<br>
<br>
Cheers,<br>
frank<br>
<br>
<br>
On 4/27/12 10:08 AM, Frank Rueter | OHUfx wrote:
<blockquote cite="mid:4F99C747.3030606@ohufx.com" type="cite">
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
Thanks Tibold, I will have a look at that.<br>
I'm still not sure how to figure out the positioning in a
procedural way though.<br>
Will investigate more.<br>
<br>
Cheers,<br>
frank<br>
<br>
On 4/26/12 6:53 PM, Tibold Kandrai wrote:
<blockquote cite="mid:4F98F0D6.8010909@gmail.com" type="cite">
<pre wrap="">Hi,
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.
Cheers,
Tibold
On 2012-04-26 08:42, Frank Rueter | OHUfx wrote:
</pre>
<blockquote type="cite">
<pre wrap="">Hi,
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:
<a moz-do-not-send="true" class="moz-txt-link-freetext" href="http://pastebin.com/index/bNJ9zeUm">http://pastebin.com/index/bNJ9zeUm</a>
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.
Frank
_______________________________________________
PySide mailing list
<a moz-do-not-send="true" class="moz-txt-link-abbreviated" href="mailto:PySide@qt-project.org">PySide@qt-project.org</a>
<a moz-do-not-send="true" class="moz-txt-link-freetext" href="http://lists.qt-project.org/mailman/listinfo/pyside">http://lists.qt-project.org/mailman/listinfo/pyside</a>
</pre>
</blockquote>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
PySide mailing list
<a moz-do-not-send="true" class="moz-txt-link-abbreviated" href="mailto:PySide@qt-project.org">PySide@qt-project.org</a>
<a moz-do-not-send="true" class="moz-txt-link-freetext" href="http://lists.qt-project.org/mailman/listinfo/pyside">http://lists.qt-project.org/mailman/listinfo/pyside</a>
</pre>
</blockquote>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
PySide mailing list
<a moz-do-not-send="true" class="moz-txt-link-abbreviated" href="mailto:PySide@qt-project.org">PySide@qt-project.org</a>
<a moz-do-not-send="true" class="moz-txt-link-freetext" href="http://lists.qt-project.org/mailman/listinfo/pyside">http://lists.qt-project.org/mailman/listinfo/pyside</a>
</pre>
</blockquote>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
PySide mailing list
<a moz-do-not-send="true" class="moz-txt-link-abbreviated" href="mailto:PySide@qt-project.org">PySide@qt-project.org</a>
<a moz-do-not-send="true" class="moz-txt-link-freetext" href="http://lists.qt-project.org/mailman/listinfo/pyside">http://lists.qt-project.org/mailman/listinfo/pyside</a>
</pre>
</blockquote>
<br>
<pre class="moz-signature" cols="72">--
Tibold Kandrai,
CEO @ Dotz Team I/S,
Software developer, consultant</pre>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
PySide mailing list
<a class="moz-txt-link-abbreviated" href="mailto:PySide@qt-project.org">PySide@qt-project.org</a>
<a class="moz-txt-link-freetext" href="http://lists.qt-project.org/mailman/listinfo/pyside">http://lists.qt-project.org/mailman/listinfo/pyside</a>
</pre>
</blockquote>
</body>
</html>