<div>Thanks for the link. I was able to get it working by placing all the widgets in the dock widget into a container frame placed in a vertical layout. That part done in Designer. Then in the application I place the custom lable widget with reimplimented sizeHint function at the bottom as a blank field so it just serves as a spacer with 0 height.</div>
<div> </div>
<div>Marc</div>
<div><br><br> </div>
<div class="gmail_quote">On Wed, Jan 21, 2009 at 9:02 AM, Darryl Wallace <span dir="ltr"><<a href="mailto:darryl.wallace@prosensus.ca">darryl.wallace@prosensus.ca</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">Try this: <br><a href="http://www.qtsoftware.com/developer/faqs/550" target="_blank">http://www.qtsoftware.com/developer/faqs/550</a><br>
<br>Darryl<br><br><br>Marc Nations wrote:<br>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">
<div class="Ih2E3d">I'm trying to resize it while it is docked. The reason I'm trying to resize it is because I want to adjust the default width of the form based on how many other windows are currently open in the main application and how big the monitor is. As a result, I won't know it's geometry until after the application starts. The dock widget is hidden until the user decides to open it. At the point it needs to know it's size.<br>
So when you say it's going to take the shape of the space it's docked in, I had assumed that using the resize() function would propagate upwards and instruct the containing frame to redraw. Is that not the case?<br>
As far as going the other direction and resizing the containing frame, which would then force a resize on the dock widget, I'm not sure how to reference the containing frame since the parent object is the main window.<br>
<br></div>
<div class="Ih2E3d"> On Wed, Jan 21, 2009 at 8:16 AM, Darryl Wallace <<a href="mailto:darryl.wallace@prosensus.ca" target="_blank">darryl.wallace@prosensus.ca</a> <mailto:<a href="mailto:darryl.wallace@prosensus.ca" target="_blank">darryl.wallace@prosensus.ca</a>>> wrote:<br>
<br> Hello,<br><br><br> Marc Nations wrote:<br><br> Hi,<br> I'm trying to resize a DockWidget after the application has<br> started. I have tried all of the functions that I thought<br> would resize it:<br>
self.ui.dockWidget.setGeometry(x,y,w,h)<br> self.ui.dockWidget.resize(w,h)<br> I tried with QSize and QGeometry as well. I also tried using<br> the adjustSize() and a couple of others to see if it changed.<br>
I tried to call show() after to see if it would help, but<br> nothing seems to work.<br> It flickers momentarily at the new size and pops back, so it<br> looks like it's being properly resizes and then something<br>
resets it back to the original size. Is this the correct way<br> to resize the dock widget, and what is causing it to<br> immediately change again?<br><br> Perhaps this is a silly question, but is it floating or is it<br>
docked? If it's docked then it's going to take the shape of the<br> space in which it is docked. If it is docked, I am wondering why<br> you're trying to change it's shape.<br><br> Darryl<br><br>
<br></div></blockquote></blockquote></div><br>