Results 1 to 4 of 4

Thread: Widget resizing problem

  1. #1
    Join Date
    Jan 2006
    Posts
    6
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Widget resizing problem

    I have created a panel, that contains one horizontal line of 3 buttons, a title, and a tableview to display the database data.

    It works ok, but when I resize the outside widget, the horizontal layout box and the tableview do not change size. The outside widget can be full screen, but the inner stuff stays at the original size!?!

    I have checked the sizepolicy and other options in the Designer when I edit the panel, and I dont see anything wrong. Any help in pointing me to what I am missing will be appreciated.

  2. #2
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    6,264
    Thanks
    36
    Thanked 1,519 Times in 1,389 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: Widget resizing problem

    Have you set a layout for the "outside widget"?

  3. #3
    Join Date
    Jan 2006
    Location
    Mountain View, CA
    Posts
    279
    Thanked 42 Times in 37 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Widget resizing problem

    Quote Originally Posted by fwohlfert
    I have created a panel, that contains one horizontal line of 3 buttons, a title, and a tableview to display the database data.

    It works ok, but when I resize the outside widget, the horizontal layout box and the tableview do not change size. The outside widget can be full screen, but the inner stuff stays at the original size!?!

    I have checked the sizepolicy and other options in the Designer when I edit the panel, and I dont see anything wrong. Any help in pointing me to what I am missing will be appreciated.
    Post your ui and we'll take a look.
    Save yourself some pain. Learn C++ before learning Qt.

  4. #4
    Join Date
    Jan 2006
    Location
    Ukraine,Lviv
    Posts
    454
    Thanks
    9
    Thanked 27 Times in 27 Posts
    Qt products
    Qt3
    Platforms
    Unix/X11 Windows

    Default Re: Widget resizing problem

    jpn right!
    It seems that you dont create main layout for your widget. If you add main layout then when you will resize your widget even in designer your tableview anh horizontal layouts must be resized.
    a life without programming is like an empty bottle

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. Widget background problem.
    By zgulser in forum Qt Tools
    Replies: 2
    Last Post: 6th January 2009, 06:34
  3. problem in widget inheritance
    By wagmare in forum Qt Programming
    Replies: 2
    Last Post: 10th December 2008, 07:35
  4. QTreeWidget, resizing item and widgets problem
    By The Storm in forum Qt Programming
    Replies: 15
    Last Post: 17th March 2008, 21:20
  5. Replies: 7
    Last Post: 3rd February 2006, 10:20

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.