Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. qml TableView and group of columns

qml TableView and group of columns

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
tableviewtableviewcolumn
1 Posts 1 Posters 828 Views
  • 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.
  • B Offline
    B Offline
    BePie
    wrote on last edited by
    #1

    Is there an easy way to have grouped columns?
    Let's say there is a item like that (item in c++ w/o proper interface and property setting, just for example):

    class Item {
        QGeoCoordinate cord;
        QString name;
    }
    

    Now I want to have a TableView with headers like that:

    name |       position        |
         |  lon  |  lat  |  alt  |
    ------------------------------
    pos 1|  21.1 |  21.1 |  21.1 |
    pos 2|  21.1 |  21.1 |  21.1 |
    pos 3|  21.1 |  21.1 |  21.1 |
    

    Is this doable (in a "clean" way) with TableView? I know I can create my own header and create roles for each coordinate part but I don't see how can I create this "group" of headers in a "clean" way (w/o hacking a lot).

    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