Details
-
Bug
-
Resolution: Done
-
P2: Important
-
4.3.3
-
None
-
8f6b8c5a9750d49e6b93804d37aa64140460bfa6
Description
In an application written with Qt and using QTreeWidget for displaying data we encountered a problem with items unexpectedly getting unselected. The problem can be reproduced with the sample application you can find attached.
One important point seems to be that we use lazy fetching of children (i.e. inserting children only when the parent is opened) because once the children are inserted, the problem does not occur anymore. In the real-world application lazy fetching of children is necessary because of performance reasons.
To reproduce the problem, please do the following:
- Compile the program and start it
- Open "Root" node
- Open "Child3" node and select "Alpha" & "Beta"
- Open "Child2" node and select "Alpha" & "Delta"
- Open "Child1" -> "Beta" and "Delta" become unselected
On our systems the problem is always reproduceable with this combination. But not all combinations of selected items reproduce the problem. E.g. the problem does not occur if "Alpha" & "Beta" are selected in both of "Child2" and "Child3".
Further tests have shown that an "itemSelectionChanged" signal is not emitted when the node is opened but selectedItems().size() is 2 which is correct.
System information:
- SuSE Linux Enterprise Desktop 10
- gcc 4.1.2
Tested on Qt 4.3.3 and Qt 4.4.1