Results 1 to 3 of 3

Thread: Qt Creator 2.0 and central control not expanding

  1. #1

    Default Qt Creator 2.0 and central control not expanding

    Hi all

    I'm intruducing to Qt world. Currently I'm studing teh Qt Creator tool for a project I want to develop using Qt libraries. I need to create an SDI main window with a Lisi View control in the client area. My problem is I still didn't understand how to make this List View control automatically expanded over all the window client area also if the main window is manually resized by the user. Using Qt Creator Design I dropped the List View control over the windows client area (as result my control is child of centraWidget). Then I set the horizontal and vertical sizePolicy as "Expanding" but nothing happens. The control remain in the center of the client area and maintain its original size also when execute the compiled software.
    I'm sure I missed something of really stupid but I still didn't find what.
    Someone can give me a suggestion?

    Thank you

  2. #2

    Default Re: Qt Creator 2.0 and central control not expanding

    Hi
    Either you can check out the setMaxSize documentation of QWidget
    or
    You can override the resizeEvent function of the widget which is holding the list box control.Then set the geometry of the listbox by reading the holder widget rect().

    Br
    Gokul
    http://gokulkartha.blogspot.com

  3. #3
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,373
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Thanks
    4
    Thanked 5,019 Times in 4,795 Posts
    Wiki edits
    10

    Default Re: Qt Creator 2.0 and central control not expanding

    You need to apply a layout on the top-level widget. Click on an empty area in the widget and click one of the layout buttons in the toolbar.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


Similar Threads

  1. Replies: 3
    Last Post: 19th February 2012, 12:40
  2. Replies: 0
    Last Post: 16th December 2009, 10:45
  3. how to use version control in qt creator
    By guchangyuan in forum Qt Programming
    Replies: 2
    Last Post: 27th July 2009, 11:20
  4. Expanding QTextEdit
    By gruszczy in forum Qt Programming
    Replies: 7
    Last Post: 16th February 2009, 05:22
  5. Expanding QLabel
    By mullwaden in forum Qt Programming
    Replies: 1
    Last Post: 15th November 2008, 09:08

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.