Results 1 to 2 of 2

Thread: How to add a checkBox to the headerItem of QTreeWidget

  1. #1
    Join Date
    Jul 2009
    Location
    ChongQing, China
    Posts
    2
    Qt products
    Qt4
    Platforms
    MacOS X Windows

    Default How to add a checkBox to the headerItem of QTreeWidget

    hi:
    I want to add a checkbox to the headerItem of QTreeWidget.just like this:


    Thanks for aamer4yu's reply!!! He suggested me to subclass QHeaderView and implement my own checkbox. but I want to know whether there is an easyier way to reach this.

    Could you give me some helps?Thans a lot!!
    Attached Images Attached Images
    Last edited by candela; 20th August 2009 at 06:53.

  2. #2
    Join Date
    Oct 2006
    Location
    New Delhi, India
    Posts
    2,467
    Thanks
    8
    Thanked 334 Times in 317 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: How to add a checkBox to the headerItem of QTreeWidget

    QTreeWidgetItem::setCheckState
    EDIT: Sorry,, didnt realise fast that it was header .
    For that I guess you will need to subclass QHeaderView and implement your own checkbox.

Similar Threads

  1. boolean field checkbox QTableView
    By skuda in forum Qt Programming
    Replies: 4
    Last Post: 8th November 2010, 13:48
  2. QTreeWidget refeshing view
    By grazyna in forum Qt Programming
    Replies: 3
    Last Post: 10th August 2009, 14:31
  3. Filling QTreeWidget / Using QTreeView
    By stefanborries in forum Qt Programming
    Replies: 1
    Last Post: 15th April 2009, 15:25
  4. how to sync a QTreeWidget and a QListWidget?
    By zl2k in forum Qt Programming
    Replies: 2
    Last Post: 5th September 2008, 20:55
  5. resizing a QTreeWidget
    By drhex in forum Qt Programming
    Replies: 6
    Last Post: 27th October 2006, 22:32

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.