[英]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
并设置每个项目的rowSpan
和columnSpan
来对单元格进行分组。 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.