+ Reply to Thread
Results 1 to 2 of 2

Thread: set Column Width in QTreeWidget?

  1. #1
    Join Date
    Dec 2006
    Posts
    211
    Thanks
    27
    Qt products
    Qt4
    Platforms
    MacOS X Windows

    Question set Column Width in QTreeWidget?

    Hi All,

    I m using QT 4.1.5 on my MAC.

    Earlier i was using Qt 4.2.2 and there is a function set ColumnWidth to set the column width of a treeWidget.

    But Due to some reason I have to work on Qt 4.1.5 and now I want to set the width of the treeWidget.

    I can do that it by resizeColumnToContents but Actually it resize the column t its contents but I want to resize it to the width given by Me.

    If anybody knows then plz help me out.

    Thanks.

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

    Default Re: set Column Width in QTreeWidget?

    QTreeView::setColumnWidth() is same than calling QHeaderView::resizeSection(). You can access the header via QTreeView::header().
    J-P Nurmi

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

    vishal.chauhan (25th June 2007)

+ Reply to Thread

Similar Threads

  1. changing column width of QTableWidget
    By juliarg in forum Newbie
    Replies: 4
    Last Post: 22nd March 2007, 15:51
  2. QTreeWidget item editing: want column specificity
    By McKee in forum Qt Programming
    Replies: 12
    Last Post: 10th December 2006, 22:12
  3. Replies: 1
    Last Post: 21st September 2006, 10:37
  4. Change column width in a QTreeWidget
    By mace in forum Qt Programming
    Replies: 2
    Last Post: 27th May 2006, 12:19
  5. QTable column stretchable with minimum Width
    By sunil.thaha in forum Qt Programming
    Replies: 0
    Last Post: 24th April 2006, 13:17

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