[Qt-interest] RES: Using QStringList (QT 4.4)
Leonardo Bispo
leonardo.bispo at corp.orolix.com
Tue Dec 9 21:11:37 CET 2008
Look at the QFile documentation (Extracted from documentation)
QStringList list;
QFile file("box.txt");
if (file.open(QFile::ReadOnly)) {
char buf[1024];
qint64 lineLength = file.readLine(buf, sizeof(buf));
if (lineLength != -1) {
list.append(buff);
}
}
Best Regards,
Leonardo Bispo de Oliveira
Desenvolvimento de Sistemas - Analista Desenvolvedor
Tel: +55 11 5508 5887, +55 11 2122 0312
Fax: +55 11 5508 5880
http://www.orolix.com.br - leonardo.bispo at corp.orolix.com
Orolix. Você NAVEGA, a gente PAGA !!!
-----Mensagem original-----
De: qt-interest-bounces at trolltech.com em nome de Ann Marie
Enviada: ter 9/12/2008 17:50
Para: qt-interest
Assunto: [Qt-interest] Using QStringList (QT 4.4)
I am trying to read in lines from a file then store a string from each line
into a QStringList. What would be the simplest way to do that? Could
someone provide me with sample code?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20081209/64be8abf/attachment.html
More information about the Qt-interest-old
mailing list