Can you provide a minimal compilable example reproducing the problem?
Can you provide a minimal compilable example reproducing the problem?
Hi,
I m attaching a code.In it i have a treeWidget on which when i clicked sometimes item is not checked or unchecked.
Does it work properly with another style, for example with plastique?
./app -style plastique
J-P Nurmi
Yes the problem remains even after changing the Style.
Hi,
No Answer????.
So Am I right it a problem of qt 4.3.2![]()
The only problem I'm experiencing with 4.3.2 is that the area that responds to check state changes is a bit too far left. With 4.3.3 it works perfectly.
J-P Nurmi
Hi jpn,
So you are saying that if I use qt 4.3.3 then this problem should not arise.
I can't say for sure. Your description "sometimes item is not checked or unchecked" is vague.
As I said, for me with Qt 4.3.2 check states change but I can notice that the area that reacts to checking is a bit too left, not exactly over the drawn check box (see the attached explanatory screenshot). With Qt 4.3.3 it reacts exactly over the drawn check box.
J-P Nurmi
By saying "Sometimes item is not checked or unchecked" I mean that sometimes item check state change on the signle click and sometimes I click several times on item and its check state does not changed.
Maybe this is OS specific? I don't have 4.3.2 installed anywhere so I can't verify it here, but if J-P tested it and it worked fine, then I don't see why it should fail elsewhere. Could you check if the same thing happens when using examples bundled with Qt?
It appears that the check box in a tree (or list) view doesn't change when checked (4.3.2) -- which if fixed in 4.3.3 means I can remove some code I added to "fix" it.
I added a:
Qt Code:
To copy to clipboard, switch view to plain text mode
and for the slot:
Qt Code:
{ if (item->checkState() == Qt::Unchecked) item->setCheckState(Qt::Checked); else item->setCheckState(Qt::Unchecked); }To copy to clipboard, switch view to plain text mode
This allows the user to click on the label for the check box & get the box toggled. (Boy, I hope 4.3.3 allows me to remove this code... although it makes it nicer for users, maybe I'll keep it either way)
Vycke
Bookmarks