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. How to merge cells with QML tableView

How to merge cells with QML tableView

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

    I don't know how to implement this, like void QTableView::setSpan() in qTableView
    here is my code example:
    TableView {
    columnWidthProvider: function (column) { return 80 }
    model:
    TableModel {
    TableModelColumn {
    display: "aa"
    }
    TableModelColumn {
    display: "bb"
    }
    TableModelColumn {
    display: "cc"
    }
    TableModelColumn {
    display: "dd"
    }
    rows: [{ }]
    }
    delegate: ItemDelegate {
    implicitWidth: 80 * 2
    implicitHeight: 25
    visible:{
    if(column % 2 == 1){
    return false;
    }
    return true;
    }
    background: Rectangle {
    color: "#F1F8E9"
    border {
    color: "#D4D4D4"
    width: 1
    }
    }
    }
    } //TableView

    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