Trolltech Home | Qt-interest Home | Recent Threads | All Threads | Author | Date
All threads index page 3

Qt-interest Archive, April 2008
QTreeWidget automatically updates it's itemWidgets?


Message 1 in thread

In QTreeWidget you can call itemWidget(QTreeWidgetItem *Widget, int 
column) to set an always visible widget into that column for that Widget 
Item.

I have set a QCheckBox into that column.  When you click on the checkbox 
to check/unckeck it, nothing happens to the underlying data in the model 
as expected.  However if you change the data in that column of that 
WidgetItem then it automatically updates the QCheckBox. 0 and 'false' 
set the checkbox to unchecked.  Anything else sets it to checked. 
However even if the checkbox is tristate i cannot seem to find a value 
that will set it to PartiallyChecked.

Ideally i don't want the have the model automatically update the 
checkbox?  Is there a way to do that?  Otherwise is there a value i can 
use to let me use the tristates of the QCheckBox?

Any thoughts appreciated.

--
 [ signature omitted ]