Results 1 to 2 of 2

Thread: Set the last column of a treeview to minimal size

  1. #1
    Join Date
    Oct 2009
    Posts
    5
    Thanks
    1

    Default Set the last column of a treeview to minimal size

    Hi,

    I have a QTreeView with 2 columns - is it possible to set the width of the last column exactly the width of the biggest cell in the second column and let the first column take all the other space?

    Thanks a lot,
    D.

  2. #2
    Join Date
    Jan 2006
    Location
    Germany
    Posts
    4,380
    Thanks
    19
    Thanked 1,005 Times in 913 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows Symbian S60
    Wiki edits
    5

    Default Re: Set the last column of a treeview to minimal size

    Hi, see QHeaderView::ResizeToContents and QHeaderView::Stretch with QHeaderView::setResizeMode()

Similar Threads

  1. Main Window minimal size constraints
    By psih128 in forum Qt Programming
    Replies: 1
    Last Post: 3rd August 2010, 18:06
  2. Replies: 1
    Last Post: 29th April 2010, 06:21
  3. Minimal Linux dist to run Qt-app from
    By AnAx in forum Installation and Deployment
    Replies: 8
    Last Post: 6th May 2009, 17:00
  4. How to find which column clicked from a treeview.
    By mekos in forum Qt Programming
    Replies: 2
    Last Post: 4th August 2008, 17:44
  5. Qt4 minimal
    By luislobo in forum Qt Programming
    Replies: 1
    Last Post: 28th March 2008, 00:38

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.