Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt
  • Unsolved
Collapse
qtws26_logo

The Qt Event of the Year: Qt World Summit 2026

Save Your Spot >
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. QTableView. Turning horizontal database table model into vertical QTableView. HOW?
Qt 6.12 LTS 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.8k 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.
  • ? Offline
    ? Offline
    A Former User
    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
    • ? Offline
      ? Offline
      A Former User
      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.

      1 Reply Last reply
      0
      • ? Offline
        ? Offline
        A Former User
        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
        • Unsolved