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. TableView merge columns in single row
Qt 6.11 is out! See what's new in the release blog

TableView merge columns in single row

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
1 Posts 1 Posters 845 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.
  • RequR Offline
    RequR Offline
    Requ
    wrote on last edited by
    #1

    Hello,

    I'm operating on TableView with 4 columns and X row number.

    I'm trying to implement mechanism that will merge whole columns in every 5 row or override this row for single one and print text (some kind of group header implementation).

    TableView {
        id: table
        ...
    
        TableViewColumn {
            role: "name"            
            width: 275
        }
        TableViewColumn {
            role: "surname"
            width: 300
        }
        TableViewColumn {
            role: "phone"
            width: 575
        }
        TableViewColumn {
            role: "ip_address"
            width: 525
        }
        model: abonents
    }
    

    I was trying to dynamicly change size in itemDelegate to override the cells by set Column 0 on TableView width and rest on 0, but it doesn't worked and looks like this.

    00bc3d70-9d52-4a6f-9199-de70b5a8c378-obraz.png

    Do do you have any idea how to merge or ovveride this row?

    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