Are you using QAbstractItemModel::dataChanged after adding data to the source model ?
Are you using QAbstractItemModel::dataChanged after adding data to the source model ?
I use QAbstractItemModel::reset() when rows are added.
I noticed that when I add enough rows, which requires a scrollbar, the rows are visible.
I believe the scrollbar calls a repaint.
The rows added are also visible when I add rows to a QTreeView which already contains at least one row.
Rows are invisible only when they are added to en empty QTreeView. Is it related to the use of QAbstractItemModel::reset()?
Thanks for helping me,
Lionel
Hi,
I had time to investigate a little further.
As I noticed before if I force a resize of the QWidget containing the QTabWidget, the new row will appear.
I also forgot to say that I use an item delegate for the QTreeView. My first thought was that I did not paint anything or the QPainter was invalid the first time I use it. But unfortunately, this is not the case. It seems to paint everything but nothing appear on screen.
If anybody has a clue, it would relieve me!
Regards,
Lionel
Bookmarks