This question was asked on stackoverflow as well. Just posting this here because the accepted answer was useful.
Another approach would be to anchor the table below the header.
TableView { id: tableView anchors.top: horizontalHeader.bottom model: TableModel { } }