QTableWidget headerView expand and merge
-
I need a QTableWidget which horizontal header will be illurstrate as the following picture

the reason is that i need this tabular ”horizontal header“ hold still while dragging vertical scroll bar,
now i have two option based from what i learned from internet
1、is to reimplement this tabular by two tableWidget,the header and the contained information is split into two QTAbleWidget,but this tablewidget is added with the help of QWidget proxy into QGraphicsScene,there are so many customized function i dont want to reimplement or connect the behavior with current QTableWidget.
2、is to seek help of merge and expand horizontal header,but i have no idea how to
PLZ help me!
with many thanks! -
@LiuXiaoHhan write your own header based on QTableWidgetItem, then apply to the selected columns with QTableWidget::setHorizontalHeaderItem()?
@artwaw many thx Mr artwaw , ive figured out from a csdn https://blog.csdn.net/panchang199266/article/details/106044246
i will make another try about what you have told me when i have some spare time,
but for now,
the upper address satisfied my needs,its about make two QTableWidget ,one is cover above the horizontal title,the other widget is aimed for fill with information except title。 -
I need a QTableWidget which horizontal header will be illurstrate as the following picture

the reason is that i need this tabular ”horizontal header“ hold still while dragging vertical scroll bar,
now i have two option based from what i learned from internet
1、is to reimplement this tabular by two tableWidget,the header and the contained information is split into two QTAbleWidget,but this tablewidget is added with the help of QWidget proxy into QGraphicsScene,there are so many customized function i dont want to reimplement or connect the behavior with current QTableWidget.
2、is to seek help of merge and expand horizontal header,but i have no idea how to
PLZ help me!
with many thanks!@LiuXiaoHhan write your own header based on QTableWidgetItem, then apply to the selected columns with QTableWidget::setHorizontalHeaderItem()?
-
@LiuXiaoHhan write your own header based on QTableWidgetItem, then apply to the selected columns with QTableWidget::setHorizontalHeaderItem()?
@artwaw many thx Mr artwaw , ive figured out from a csdn https://blog.csdn.net/panchang199266/article/details/106044246
i will make another try about what you have told me when i have some spare time,
but for now,
the upper address satisfied my needs,its about make two QTableWidget ,one is cover above the horizontal title,the other widget is aimed for fill with information except title。 -
L LiuXiaoHhan has marked this topic as solved on
-
L LiuXiaoHhan has marked this topic as solved on
-
L LiuXiaoHhan has marked this topic as solved on