Results 1 to 4 of 4

Thread: Changing QTableView column display order

  1. #1
    Join Date
    Jun 2010
    Location
    Cincinnati, Ohio, USA
    Posts
    92
    Thanks
    3
    Qt products
    Qt4
    Platforms
    Windows

    Question Changing QTableView column display order

    I have a model that is being used a number of different views. The order of the columns change based on the view. How do I go about changing the order of the columns?

    P.S. Most of the columns are not actually displayed on any given view.

  2. #2
    Join Date
    Jun 2010
    Location
    Cincinnati, Ohio, USA
    Posts
    92
    Thanks
    3
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Changing QTableView column display order

    I take it that this is not possible?

  3. #3
    Join Date
    Jan 2006
    Location
    Belgium
    Posts
    1,938
    Thanked 268 Times in 268 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows
    Wiki edits
    20

    Default Re: Changing QTableView column display order

    Try using a proxy model.

  4. #4
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,729
    Thanks
    13
    Thanked 1,610 Times in 1,537 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Wiki edits
    17

    Default Re: Changing QTableView column display order

    Simple column order and visibility is a function of the view: QHeaderView::moveSection() and QHeaderView::hideSection()

Similar Threads

  1. Replies: 5
    Last Post: 25th February 2010, 17:29
  2. How to change the order of QTableView Column ?
    By Kode.Cooper in forum Qt Programming
    Replies: 1
    Last Post: 27th January 2010, 08:55
  3. QTreeView: get current sort column and order
    By supergillis in forum Qt Programming
    Replies: 1
    Last Post: 14th October 2008, 17:25
  4. Changing column order in QTableView
    By Banjo in forum Qt Programming
    Replies: 1
    Last Post: 18th January 2008, 06:49
  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.