Results 1 to 2 of 2

Thread: Layout

  1. #1
    Join Date
    Jan 2006
    Location
    Sta. Eugènia de Berga (Vic - Barcelona - Spain)
    Posts
    869
    Thanks
    70
    Thanked 59 Times in 57 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Layout

    Hi,

    I have one QWidget that has one QTableWidget and one QWidget(used for painting something). This QWidget is inserted to a QDockWidget. This QWidget has a QVBoxLayout to manage the QTableWidget and the second QWidget vertically.

    The QTableWidget has 3 colums and the number of rows are variable.

    What I want is that the QTableWidget occupies the minimum space and the widget occupies the maximum. This is because I have the QTableWidget as a statistic record and the QWidget draws a Pie chart.

    Thanks,
    Òscar Llarch i Galán

  2. #2
    Join Date
    Jan 2006
    Location
    India
    Posts
    115
    Thanks
    3
    Thanked 4 Times in 4 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: Layout

    Have you tried adding the other QWidget to the layout using stretch factor of 1 i.e.
    Qt Code:
    1. layout->addWidget(widget, 1);
    To copy to clipboard, switch view to plain text mode 

  3. The following user says thank you to yogeshm02 for this useful post:

    ^NyAw^ (18th February 2008)

Similar Threads

  1. changing layout of a widget
    By mikro in forum Qt Programming
    Replies: 10
    Last Post: 4th August 2009, 20:21
  2. Qt layout memory issue
    By bunjee in forum Qt Programming
    Replies: 9
    Last Post: 25th August 2007, 17:11
  3. Replies: 2
    Last Post: 30th April 2007, 12:11
  4. Resizing problems when applying a layout
    By JimBrown in forum Newbie
    Replies: 1
    Last Post: 21st February 2007, 22:54
  5. "dynamic" layout
    By hulk in forum Qt Programming
    Replies: 2
    Last Post: 9th May 2006, 07:16

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.