[Qt-qml] Flickable with dynamically growing children
Bo Elmgreen
bo.elmgreen at gmail.com
Wed Mar 23 19:20:16 CET 2011
Hi again,
Well, that's true. I'll give it a try.
Cheers,
Bo
On Wed, Mar 23, 2011 at 7:00 PM, Stephen Kelly <steveire at gmail.com> wrote:
> Bo Elmgreen wrote:
>
> > Hi!
> >
> > Thanks for your answers. Unfortunately, I cannot share the source code,
> > but I had to add the ListView.anAdd signal handler in the view delegate
> in
> > order for it to work. I had added the calls to notify about the adding
> and
> > removal of rows in my data model, e.g.:
> >
> > void ContactModel::addContact(Contact *contact)
> > {
> > qDebug() << THIS_FILE << "addContact - rowcount:" << rowCount();
> > beginInsertRows(QModelIndex(), rowCount(), rowCount()+1);
> > m_contacts << contact;
> > endInsertRows();
> > }
>
> beginInsertRows(QModelIndex(), rowCount(), rowCount());
>
> Not +1...
>
> http://doc.qt.nokia.com/latest/qabstractitemmodel.html#beginInsertRows
>
>
> >
> > but that was apparently not enough. I have a feeling that it is due to
> > that I have set interactive to false on the list views, but I haven't
> > tried to verify this - so it is just a wild guess :-)
> >
> > Cheers,
> > Bo
> >
>
>
> _______________________________________________
> Qt-qml mailing list
> Qt-qml at qt.nokia.com
> http://lists.qt.nokia.com/mailman/listinfo/qt-qml
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt.nokia.com/pipermail/qt-qml/attachments/20110323/387e2a87/attachment.html
More information about the Qt-qml
mailing list