Results 1 to 7 of 7

Thread: spaning the headers in the QTableView

  1. #1
    Join Date
    Mar 2008
    Posts
    25
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default spaning the headers in the QTableView

    Hello everybody,

    I have the task to create the table (QTableView) as it is shown in attachment

    I can span the cells but at the same way I need to span the headers. Because spanning the cells (in the row or in the column) the table has unspaned headers.
    Do you have an idea of how to span the headers?
    Attached Images Attached Images
    Last edited by ru_core; 13th April 2008 at 16:54.

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: spaning the headers in the QTableView

    Default headers cannot be spanned.

  3. #3
    Join Date
    Mar 2008
    Posts
    25
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: spaning the headers in the QTableView

    ok but what way can I solve my task?
    Do you have any ideas?

  4. #4
    Join Date
    Mar 2008
    Posts
    25
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: spaning the headers in the QTableView

    merging the cells is impossible in the QTableView object, isn't it?

  5. #5
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: spaning the headers in the QTableView

    Spanning is merging. If you want to do something with the header, you need to subclass QHeaderView.

  6. The following user says thank you to wysota for this useful post:

    ru_core (13th April 2008)

  7. #6
    Join Date
    Mar 2008
    Posts
    25
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: spaning the headers in the QTableView

    Last edited by ru_core; 13th April 2008 at 18:08.

  8. #7
    Join Date
    Jun 2013
    Posts
    6
    Thanks
    2
    Qt products
    Qt4
    Platforms
    MacOS X Windows

    Default Re: spaning the headers in the QTableView

    I also want to span two column, the link above is not valid anymore, can somebody point to some sample code to span headers.

Similar Threads

  1. How to remove headers from QTableView.
    By rajeshs in forum Qt Programming
    Replies: 7
    Last Post: 18th November 2011, 20:00
  2. QTableView : headers disappear
    By xavier in forum Qt Programming
    Replies: 2
    Last Post: 8th May 2006, 16:57

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.