[Qt-interest] How to see a part of the QStringList
Tim W
timpie.w at gmail.com
Sun Apr 26 15:32:52 CEST 2009
> I have made it as you told me but it still doesn't work
> sensor1->setText(list.at(0));
> sensor2->setText(list.at(1));
Don't use QList::at if you don't have checked the boundaries of the list.
Try QList::value instead because value will return a default value when you
go over the upper bound.
sensor2->setText(list.value <http://list.at/>(1));
Cheers,
Tim
--
An Apple a day keeps Windows away
ACCU - http://www.accu.org - Professionalism in Programming.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20090426/536688b9/attachment.html
More information about the Qt-interest-old
mailing list