Details
-
Bug
-
Resolution: Unresolved
-
P3: Somewhat important
-
None
-
6.7
-
None
Description
There is some vagueness with the signal name dataChanged, its doc states that “This signal is emitted whenever the data in an existing item changes”, in fact it only tells the connected view that the data of the currently displayed items has changed(as said in this post), it is not emitted if the structure of the underlying data changes, this is the vagueness its name dataChanged brings, “the structure of the underlying data changes” is also actually one side of the data changes. The vagueness had brought problems to a lot of users.
The Detailed Description section of the doc says if “the structure of the underlying data changes”, the layoutChanged() signal is the one being emitted, however, the concept of layout normally indicates that the basic structure (row and column count) remains unchanged, thus the name and the functionality of this signal don’t match, also caused some ambiguity.
Perhaps a better improvement is to make dataChanged() also emitted if the structure of the underlying data changes. The next best option is to point out that to be notified if the structure of the underlying data changes go to use layoutChanged() and also point out the feature in the doc of layoutChanged() not just in the Detailed Description section of the doc. And use layoutChanged() rather than dataChanged() as an example in this tutorial.