PDA

View Full Version : QTreeWidget - extending check-box capabilities



mcherkas
30th October 2011, 10:05
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.

Santosh Reddy
1st November 2011, 05:17
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"

mcherkas
1st November 2011, 11:51
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.