Results 1 to 5 of 5

Thread: Widget does not resize correctly

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Mar 2010
    Location
    The Netherlands
    Posts
    7
    Thanks
    2
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11

    Default Widget does not resize correctly

    Hello everybody.

    I have the following layout in my Widgets:

    Widget 1:
    A QWidget (named extWidget) and a Groupbox containing pushbuttons in a vertical layout. Groupbox has max height. QWidget fills the rest of the screen: sizePolicy(expanding,expanding).

    Widget 2:
    9 pushbuttons in a GridLayout.

    Now when the first Widget is created. I create the 2nd Widget with the extWidget as parent.

    Now when I run my code the 2nd widget gets displayed in the extWidget area of the 1st. So far so good.
    But the 2nd widget is displayed with its size as set at design time and when I resize the 1st widget, the 2nd does not change.

    How can I get my 2nd widget to alter its size to the available space of the extWidget area of the 1st?

    Qt Code:
    1. // Code from the constructor of the 1st widget
    2. m_ui->setupUi(this);
    3. // Create the 2nd Widget
    4. StdConfig = new unitconfigStd(m_ui->extWidget);
    5. StdConfig.show();
    To copy to clipboard, switch view to plain text mode 


    Thank you for your time,
    D
    Last edited by Demandred; 15th April 2010 at 09:20.
    0x2B || !0x2B // Hamlet

Similar Threads

  1. proportional widget resize
    By momesana in forum Qt Programming
    Replies: 7
    Last Post: 15th December 2010, 03:22
  2. Resize Widget To Desktop Size
    By fruzzo in forum Qt Programming
    Replies: 6
    Last Post: 2nd October 2008, 15:29
  3. Replies: 5
    Last Post: 25th May 2008, 08:22
  4. Resize a Widget
    By sonu in forum Qt Programming
    Replies: 9
    Last Post: 29th October 2007, 07:06
  5. Custom Shape Widget (resize)
    By PiXeL16 in forum Qt Programming
    Replies: 7
    Last Post: 12th February 2007, 07:00

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.