QTableView. Turning horizontal database table model into vertical QTableView. HOW?

  • I have a table in a database. It's a standard simple little table (Columns: id, name, brand, Rows(example): 3, Nokia, 3310, etc.). I want to get the data from the database table and show it in QTableView as vertical. Basically rotating the table 90 degrees counter-clockwise. Turning horizontal headers into vertical headers.
    What is the simplest way to do this?

    Thanks in advance.

  • As a first idea - I would write simple wrapper - table model which return data from original model according to your needs.

  • I'm past this. I figured it out how to do it but I didn't do it because of too much work for insignificant results. I could have gotten the data manually and then put it manually in a table according to my needs.
    I thank you for your answer.

Log in to reply

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.