Results 1 to 5 of 5

Thread: How to resize a widget inside my centralWidget()?

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jan 2008
    Location
    Davao City, Philippines
    Posts
    77
    Thanks
    16
    Thanked 4 Times in 4 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: How to resize a widget inside my centralWidget()?

    Quote Originally Posted by wysota View Post
    It may have a layout but you are not adding your widget to it.
    wysota, you are the greatest!!!!

    I've added one line to my code and now it's working.

    Qt Code:
    1. frameHome = new QWidget( myMainWindow->centralWidget() );
    2. myMainWindow->gridLayout->addWidget(frameHome, 0, 0, 1, 1);
    3. setupUi( frameHome );
    To copy to clipboard, switch view to plain text mode 

    Thanks again for giving me the right idea.

    Have a nice day.
    Last edited by gboelter; 4th December 2009 at 10:27. Reason: updated contents

Similar Threads

  1. QDockWidget inside another widget in the center?
    By Antebios in forum Qt Programming
    Replies: 1
    Last Post: 16th February 2010, 07:06
  2. Resize widget force layout resizing
    By ^NyAw^ in forum Qt Programming
    Replies: 17
    Last Post: 11th February 2009, 11:27
  3. Custom Widget inside a QVboxLayout
    By nemesis in forum Qt Programming
    Replies: 5
    Last Post: 25th June 2008, 14:55
  4. Replies: 5
    Last Post: 25th May 2008, 08:22
  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
  •  
Qt is a trademark of The Qt Company.