Chris,

In my last explanation I've assumed you are using QtDesigner (stand alone or within QtCreator) to graphically design you GUI.

But if you are creating the UI programatically, you can achieve the same result (adding the window layout) by creating a grid layout (or any other layout) and calling your window's setLayout() method passing this layout:

Look at the QWidget::setLayout() documentation for more information.

Regards,

Rodrigo Tavares

Rodrigo Tavares wrote:
Hello Chris,

You need to set the window layout, which is not the same as adding an outter layout enclosing all the other widgets.

To set the window layout, simply click with the right mouse button on your form background and select the "Lay out -> Lay Out in a Grid" option from the pop-up menu. This will create the window layout which will be resized when the window is resized.

Regards,

Rodrigo Tavares



Chris Bruner wrote:
Paul Hartman wrote:
  
On Tue, Feb 9, 2010 at 11:45 AM, Chris Bruner <[email protected]> wrote:
  
    
I'm trying to do something that I'm sure is simple but somehow escapes
me. I've got a QGraphicsView inside a QFrame inside a QGridLayout inside
a QVBoxLayout inside a QWidget inside a QMainWindow.
I want to resize the window and have the QGraphicsView follow along.
Instead what I see is the window resizeing and the view staying the same
and getting covered up.
    
      
Look at the chapter "Layout Management" in the Qt documentation, maybe
it will give you some hints.
  
    
Thanks for that, it has made some things a bit clearer. It looks to me 
like the widgets will resize themselves when the layout changes size, 
but I still can't get the layout/widget to change size as the window 
changes size. All that happens is the window cuts off the widget.  What 
am I missing?
_______________________________________________
Qt-creator mailing list
[email protected]
http://lists.trolltech.com/mailman/listinfo/qt-creator


  


_______________________________________________ Qt-creator mailing list [email protected] http://lists.trolltech.com/mailman/listinfo/qt-creator
_______________________________________________
Qt-creator mailing list
[email protected]
http://lists.trolltech.com/mailman/listinfo/qt-creator

Reply via email to