Details
-
Bug
-
Resolution: Unresolved
-
P3: Somewhat important
-
None
-
5.4.1, 5.4.2, 5.5.0
-
None
-
Windows/Linux + Qt 5.4.1/5.4.2/Qt 5.5
Description
Let's have this application:
- itemview (QTreeView)
- model (QSqlTableModel)
Attach model to view and reimplement QTreeView::selectionChanged(...) method. Place breakpoint in it.
Now do this scenario:
- Load some data into model via select().
- Select some items in displayed data via itemview.
- Force reloading of the model via select() again.
Expected behavior: Breakpoint is hit after each action 2, 3.
Real behavior: No breakpoint is hit after action 3. It is hit only after action 2, which is obvious. But after action 3, selection was indeed changed, because model was repopulated with new data and after that, there is no new visible selection, thus selection is really changed.
FACT: This bug was not present in Qt 4.x.
Real-world bug reproduction: https://bitbucket.org/skunkos/rssguard/src/b8a056fff161c137531ff5558f178781b54be804/src/gui/messagesview.cpp?at=master#cl-248