[Interest] Qt ListView Christmas Bug
rpzrpzrpz at gmail.com
rpzrpzrpz at gmail.com
Thu Dec 24 22:33:04 CET 2015
Tried every combination of calling dataChanged( ) to force ListView to
actually repaint to no avail on OSX and 5.5.1 QML Listview
Sparse examples and references found online have no effect, nothing will
force any row or an entire ListView to repaint itself.
So far, only resetmodel( ) works to force repaint, but it has terrible
exception problems with abstractlistmodel destructor
as detailed in https://bugreports.qt.io/browse/QTBUG-50169
md
On 12/24/2015 1:56 PM, mark diener wrote:
> Does anybody have a different way to cause a ListView to re-retrieve
> the data in the model without causing AbstractListModel destructor
> exceptions.
>
> Using beginResetModel() / endResetModel() in the abstractlistmodel causes
> the model destructor to be called with:
>
>
> testalert(1543,0x7fff72265000) malloc: *** error for object
> 0x7fff5fbff568: pointer being freed was not allocated
>
> *** set a breakpoint in malloc_error_break to debug
>
> But at no point, either explicity or implicitly do I try to free any models.
>
> Removing calls to beginResetModel() / endResetModel() gets rid of the
> exception but then I lose my ability to cause ListView to re-paint
> itself with new data. (But no rows added or removed)
>
> There is nothing obvious to call in the docs when you are NOT
> inserting or removing rows, but changing the data the of rows already
> displayed.
>
> >From the docs:
>
> void QAbstractItemModel::dataChanged(const QModelIndex & topLeft,
> const QModelIndex & bottomRight, const QVector<int> & roles =
> QVector<int> ())
>
> This signal is emitted whenever the data in an existing item changes.
>
> The abstractitem example does NOT show how to call dataChanged() effectively.
>
> Still looking for example on-line.
>
> Merry Christmas,
>
> md
>
More information about the Interest
mailing list