Hi Thomas,

thank you for the answer. I could change my code to implement this. But the QML UI should never request data for item with index -1. Such item doesn't exist. There should be two items with indexes 0 and 1.

So even if I changed my code so that it returns None, I would only eliminate the error message, but it wouldn't solve my problem. I will still get empty delegates.

Regards,
Vladimir

Dne 24.2.2011 11:48, Thomas Perl napsal(a):
Hi Vláďa,

2011/2/24 Vláďa<vlad...@atlas.cz>:
[...] I think the most important information is that QML
requests from QAbstractListModel item with index -1, which of course doesn't
exist.
In that case, your model should return None (in C++ one would return
an empty/invalid(?) QVariant.

HTH.
Thomas
_______________________________________________
PySide mailing list
PySide@lists.openbossa.org
http://lists.openbossa.org/listinfo/pyside

Reply via email to