Results 1 to 2 of 2

Thread: How to add a widget as a header item in QTableWidget?

  1. #1
    Join Date
    Jun 2018
    Location
    India
    Posts
    34
    Thanks
    3
    Qt products
    Qt4 Qt5
    Platforms
    Windows

    Question How to add a widget as a header item in QTableWidget?

    Hi,

    I am using a QTableWidget(3x3) in which each column header should be a widget (combination of icon, label,link label). I could not see any way of adding a widget as a header item. Need help with possible approaches to get the desired result.

    TIA

  2. #2
    Join Date
    Jul 2008
    Location
    Germany
    Posts
    510
    Thanks
    11
    Thanked 76 Times in 74 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: How to add a widget as a header item in QTableWidget?

    Hi, at least icon (http://doc.qt.io/qt-5/qtablewidgetitem.html#setIcon) and label (http://doc.qt.io/qt-5/qtablewidgetitem.html#setText) should be possible using the standard QTableWidgetItem. I'm not sure about links.

    Ginsengelf

    edit: DOCS tags messed up the links

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

    chithara (22nd August 2018)

Similar Threads

  1. Merging of header in QTableWidget
    By Kishor Gupta in forum Qt Programming
    Replies: 1
    Last Post: 15th September 2017, 16:46
  2. Replies: 5
    Last Post: 30th September 2013, 23:03
  3. How to edit Horizontal Header Item in QTableWidget
    By ioannis in forum Qt Programming
    Replies: 6
    Last Post: 5th March 2013, 18:50
  4. QTableWidget NW corner header item?
    By McKee in forum Qt Programming
    Replies: 9
    Last Post: 30th May 2012, 23:44
  5. QStandardItem's header item and header label
    By feverzsj in forum Newbie
    Replies: 1
    Last Post: 14th January 2010, 19: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.