[Qt-interest] How to see a part of the QStringList

Stefanos Antaris santaris at csd.auth.gr
Sun Apr 26 10:09:16 CEST 2009


Petr S(tetiar wrote:
> Stefanos Antaris <santaris at csd.auth.gr> [2009-04-26 00:18:53]:
>
>   
>> Hello.I want to split the string into smaller strings.I used the split 
>> function but now i want to show into my GUI only some parts of the 
>> QStringList.I have made the following code but the GUI crash.
>> [code]
>>     QStringList list=currentFortune.split(",");
>>     QString sensor1string=list[0];
>>     sensor1->setText(sensor1string);
>>     
>
> 	sensor1->setText(list.at(0));
>
>   
I have made it as you told me but it still doesn't work
    sensor1->setText(list.at(0));
    sensor2->setText(list.at(1));
    sensor3->setText(list.at(2));
    sensor4->setText(list.at(3));
    sensor5->setText(list.at(4));


If i just leave the first sensor without the others it works fine.But 
when i try to use the others it crashes.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20090426/40745cf7/attachment.html 


More information about the Qt-interest-old mailing list