Hi,
I'm having problems with QTextStream
Code:
bool b1 = m_qFile.isOpen(); //returns true m_qStream.setDevice(&m_qFile); //QTextStream m_qStream2.setDevice(&m_qFile); //QDataStream QString qText; for (int i=0; i<qList .count(); i++) { qText= qList.at(i); m_qStream << qText; //It don't write anything m_qStream2 << qText; //It writes the QString } m_qFile.flush(); m_qFile.close();
If I use QTextStrem, it don't write anything to the file but using QDataStream it writes the QString data into the file. I don't understand what it's happening. :(
Thanks,