Results 1 to 3 of 3

Thread: swap headers in QTableView

  1. #1
    Join Date
    May 2008
    Posts
    7
    Thanks
    4

    Default swap headers in QTableView

    Hello,

    What is the easiest way to do the following in a QTableView:

    X| A B C
    --------------
    D|
    E|
    F|

    convert to:

    X| D E F
    --------------
    A|
    B|
    C|


    To be more accurate, I have a QSqlTableModel via which I populate a QTableView. Now instead of showing the database entries (records) in each row of the view, I would like to show them in every column of the view.

    Thank you

    (P.S. my ascii art sucks, freel free to spit me :P)

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

    Default Re: swap headers in QTableView

    See [wiki]Transpose proxy model[/wiki].
    J-P Nurmi

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

    dimixan (26th May 2008)

  4. #3
    Join Date
    May 2008
    Posts
    7
    Thanks
    4

    Default Re: swap headers in QTableView

    Thank you very much. That was exactly what I was looking for

Similar Threads

  1. spaning the headers in the QTableView
    By ru_core in forum Qt Programming
    Replies: 6
    Last Post: 11th June 2013, 14:17
  2. How to remove headers from QTableView.
    By rajeshs in forum Qt Programming
    Replies: 7
    Last Post: 18th November 2011, 21:00
  3. deleting selected headers
    By ru_core in forum Qt Programming
    Replies: 3
    Last Post: 16th April 2008, 08:53
  4. QTableView : headers disappear
    By xavier in forum Qt Programming
    Replies: 2
    Last Post: 8th May 2006, 17:57

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.