简体   繁体   English

Qt,创建非常自定义的表

[英]Qt, creating very custom table

在此处输入图片说明

Hello! 你好! I wonder if there is a way of making such kind of table with combined cells using Qt. 我想知道是否有一种方法可以使用Qt使用合并的单元格制作此类表。

Any advices? 有什么建议吗?

You can use QGridLayout , add QFrame s and set the rowSpan and columnSpan of each item to group cells. 您可以使用QGridLayout ,添加QFrame并设置每个项目的rowSpancolumnSpan来对单元格进行分组。 You will have to come up with your own controller, though, for applying data to the cells. 但是,您必须想出自己的控制器才能将数据应用于单元格。

在此处输入图片说明

正如RobbieE在评论中所说, QTableView::setSpan()函数可以很好地完成这项工作!

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM