Results 1 to 3 of 3

Thread: QTreeWidget - extending check-box capabilities

  1. #1
    Join Date
    Oct 2011
    Posts
    2
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default QTreeWidget - extending check-box capabilities

    Hi,
    As stated in the thread header - I'm looking for a way to enable the checkbox (that usually is empty or holds a "v") to hold an additional value - "x".
    The logic is quite simple - "empty" (click) -> "v" (click) -> "x" (click) -> "empty".

    Thanks much,
    Michael.

  2. #2
    Join Date
    Mar 2011
    Location
    Hyderabad, India
    Posts
    1,882
    Thanks
    3
    Thanked 452 Times in 435 Posts
    Qt products
    Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows
    Wiki edits
    15

    Default Re: QTreeWidget - extending check-box capabilities

    It is possible with QCheckBox directly, just use QCheckBox:: setTristate(true), this makes it tri-stated, i.e. you will have
    "Qt::Unchecked" (click) -> "Qt::PartiallyChecked" (click) -> "Qt::Checked" (click) -> "Qt::Unchecked"

  3. #3
    Join Date
    Oct 2011
    Posts
    2
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: QTreeWidget - extending check-box capabilities

    Santosh,
    thanks for your reply.
    Unfortunately, I'm using the third state already for partially checked "branches". For example - the father node holds 3 children, 1 one of which is marked.
    I need an additional marking option - "x".
    Any ideas on that?

    Thanks again,
    Michael.

Similar Threads

  1. Capabilities problem
    By kapseli in forum Qt Programming
    Replies: 1
    Last Post: 18th August 2011, 11:36
  2. How to make QtreeWidget's custom check, uncheck and Scrollbar
    By santosh.kumar in forum Qt Programming
    Replies: 0
    Last Post: 17th August 2010, 11:23
  3. Replies: 5
    Last Post: 7th July 2010, 04:58
  4. MP3 capabilities in QT
    By Havard in forum Qt Programming
    Replies: 2
    Last Post: 2nd September 2008, 10:55
  5. QTreeWidget (Row Check, Custom Sort)
    By AaronMK in forum Qt Programming
    Replies: 3
    Last Post: 8th January 2008, 15:55

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.