Results 1 to 5 of 5

Thread: [qt4 & Xp] resize columns of a QTreeView

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jan 2006
    Location
    Grenoble, France
    Posts
    165
    Thanks
    106
    Qt products
    Qt4
    Platforms
    Windows

    Red face [QT4 & XP] resize columns of a QTreeView

    I have this QtreeView 'table' based on a QStandardItemModel 'model'.

    Qt Code:
    1. model->setHeaderData(0, Qt::Horizontal, tr("Mois"));
    2. model->setHeaderData(1, Qt::Horizontal, tr("Facture"));
    To copy to clipboard, switch view to plain text mode 
    I found how I can set the header text, but not how I can resize the columns.
    No member in QTreeView does that. And the model should not be involved I guess.
    resizeColumnTo Contents does not help me.

    So I don't know how I can resize my columns in the view !!
    Last edited by incapacitant; 2nd March 2006 at 13:40. Reason: better title

Similar Threads

  1. Don't resize columns - QTableView
    By estanisgeyer in forum Qt Programming
    Replies: 1
    Last Post: 26th January 2009, 16:59
  2. Moving columns/hiding columns in QTreeView
    By yogeshm02 in forum Qt Programming
    Replies: 4
    Last Post: 14th March 2007, 16:22
  3. Resize QTreeWidget columns to contents
    By FaS in forum Qt Programming
    Replies: 9
    Last Post: 2nd July 2006, 20:48
  4. [QT4 & XP] QTreeView issue with Designer form
    By incapacitant in forum Newbie
    Replies: 3
    Last Post: 2nd March 2006, 17:42
  5. Changing the order of columns in QTreeView
    By johnny_sparx in forum Qt Programming
    Replies: 1
    Last Post: 15th February 2006, 00:00

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.