Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. QTableView. Turning horizontal database table model into vertical QTableView. HOW?
Qt 6.11 is out! See what's new in the release blog

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

Scheduled Pinned Locked Moved General and Desktop
3 Posts 2 Posters 1.6k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • O Offline
    O Offline
    ogrishmania
    wrote on last edited by
    #1

    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.

    1 Reply Last reply
    0
    • I Offline
      I Offline
      INeedMySpace
      wrote on last edited by
      #2

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

      You have been involved in illegal use of magic.

      1 Reply Last reply
      0
      • O Offline
        O Offline
        ogrishmania
        wrote on last edited by
        #3

        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.

        1 Reply Last reply
        0

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved