Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. QTableWidget headerView expand and merge
Forum Updated to NodeBB v4.3 + New Features

QTableWidget headerView expand and merge

Scheduled Pinned Locked Moved Solved General and Desktop
3 Posts 2 Posters 428 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.
  • L Offline
    L Offline
    LiuXiaoHhan
    wrote on last edited by LiuXiaoHhan
    #1

    I need a QTableWidget which horizontal header will be illurstrate as the following picture22df327f-6fe5-4134-8b17-0ef1631b9e0f-image.png

    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!

    artwawA 1 Reply Last reply
    0
    • artwawA artwaw

      @LiuXiaoHhan write your own header based on QTableWidgetItem, then apply to the selected columns with QTableWidget::setHorizontalHeaderItem()?

      L Offline
      L Offline
      LiuXiaoHhan
      wrote on last edited by
      #3

      @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。

      1 Reply Last reply
      0
      • L LiuXiaoHhan

        I need a QTableWidget which horizontal header will be illurstrate as the following picture22df327f-6fe5-4134-8b17-0ef1631b9e0f-image.png

        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!

        artwawA Offline
        artwawA Offline
        artwaw
        wrote on last edited by
        #2

        @LiuXiaoHhan write your own header based on QTableWidgetItem, then apply to the selected columns with QTableWidget::setHorizontalHeaderItem()?

        For more information please re-read.

        Kind Regards,
        Artur

        L 1 Reply Last reply
        3
        • artwawA artwaw

          @LiuXiaoHhan write your own header based on QTableWidgetItem, then apply to the selected columns with QTableWidget::setHorizontalHeaderItem()?

          L Offline
          L Offline
          LiuXiaoHhan
          wrote on last edited by
          #3

          @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。

          1 Reply Last reply
          0
          • 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

          • Login

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • Users
          • Groups
          • Search
          • Get Qt Extensions
          • Unsolved