QML question
Tomaz Canabrava
tcanabrava at kde.org
Wed Apr 27 09:55:25 PDT 2016
Please, please:
don't add more stuff to the QMLManager, it's a huge beast already :)
crete something like this:
Q_INVOKABLE QStringListModel : DiveObjectHelper::buddies() {
static QStringListModel buddies = new QStringListModel();
QStringList temp;
for_each_dive (i, d) {
temp << d->buddy;
}
temp.removeDuplicates();
buddies.setStringList(temp);
qDebug() << temp;
return buddies;
}
What can be happening is that a QStringList will not tell QML that it
changed, and thus, it wont update it's contents.
a Model will.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.subsurface-divelog.org/pipermail/subsurface/attachments/20160427/684faa7b/attachment.html>
More information about the subsurface
mailing list