[an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive]
 
[an error occurred while processing this directive] [an error occurred while processing this directive]
Skåne Sjælland Linux User Group - http://www.sslug.dk Home   Subscribe   Mail Archive   Forum   Calendar   Search
MhonArc Date: [Date Prev] [Date Index] [Date Next]   Thread: [Date Prev] [Thread Index] [Date Next]   MhonArc
 

QStringList - hvordan trækker jeg en værdi ud?



Hej alle

Jeg har et program Qt program hvor jeg henter en kommasepereret liste ind i
QstringList objekt og jeg spørg derefter om strørelsen af listen (antallet
af elementer) med:

QStringList bKoeff(QStringList::split(",",koefficientLineEdit->text()));
int bSize = bKoeff.count();

Nu ville jeg rigtigt gerne hente en værdi ud af listen og har prøvet
følgende:

double iValue = bKoeff[bSize-1];

Men så får jeg en fejl når jeg kompiler, der hedder:

.ui/../form1.ui.h:121: error: cannot convert 'QString' to 'double' in
initialization

Så jeg skal hente værdien ud på en anden måde, men hvordan? Jeg har prøvet
at kigge på:
http://doc.trolltech.com/3.3/qstringlist.html og
http://doc.trolltech.com/3.3/qvaluelist.html
men jeg kan simpelthen ikke finde en funktion til at hive et element ud af
listen med? 


-- 
Med venlig hilsen \ Kind regards
Thomas R. N. Jansson

Geek By Nature | Linux By Choice
http://www.fys.ku.dk/~tjansson/


 
Home   Subscribe   Mail Archive   Index   Calendar   Search

 
 
Questions about the web-pages to <www_admin>. Last modified 2006-02-01, 02:01 CET [an error occurred while processing this directive]
This page is maintained by [an error occurred while processing this directive]MHonArc [an error occurred while processing this directive] # [an error occurred while processing this directive] *