Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

TableView merge columns in single row



  • 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?


Log in to reply