Re: QTreeView Checkable Item
Code:
Qt
::CheckState checked
= (Qt
::CheckState) variant.
convert(QVariant::Int);
Don't know whether this is your problem or not, but variant.convert() returns a bool. In this case it will always be true (checked in the preceding "if" statement). Try using variant.toInt()
Re: QTreeView Checkable Item
Quote:
Originally Posted by
norobro
Code:
Qt
::CheckState checked
= (Qt
::CheckState) variant.
convert(QVariant::Int);
Don't know whether this is your problem or not, but variant.convert() returns a bool. In this case it will always be true (checked in the preceding "if" statement). Try using variant.toInt()
ops...a little careless mistake, I don't realize that the returned type is bool...thanks ;)