Results 1 to 3 of 3

Thread: trying to union two headers of QTableWidget

  1. #1
    Join Date
    Sep 2007
    Location
    Ankara TURKEY
    Posts
    32
    Thanks
    8
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default trying to union two headers of QTableWidget

    Dear all;
    I am trying to put a header for 2 columns in a table.

    Like I have 2 columns like A and B,

    and for the header I would like to put for these 2 columns a "HEADER of A and B"

  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: trying to union two headers of QTableWidget

    If I understand you correctly, then the answer is that you can't do it with the standard table. You'd have to subclass QHeaderView and implement the "join" yourself.

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

    uygar (27th September 2007)

  4. #3
    Join Date
    Sep 2007
    Posts
    7
    Thanked 1 Time in 1 Post

    Default Re: trying to union two headers of QTableWidget

    you could try to embed multiple child tables into one parent table and hide the child table header. say you have column a, b, c and want header to have 2 columns "a and b" and "c" then you would need a parent table with 2 column and a child table with 2 columns (a,b) and a child table with 1 column (c)

    see setCellWidget ( int row, int column, QWidget * widget ) of QTableWidget

  5. The following user says thank you to xbase for this useful post:

    uygar (27th September 2007)

Similar Threads

  1. How to make headers fixed sized? (QTableWidget)
    By macias in forum Qt Programming
    Replies: 4
    Last Post: 13th August 2007, 15:57
  2. Replies: 3
    Last Post: 29th August 2006, 15:07

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.