Masters,
I have a QStringList and I want to read from it one character at a time (just like using getch() from files). I am using qt 3.3 . Can anybody help me out . Thanking you..
Masters,
I have a QStringList and I want to read from it one character at a time (just like using getch() from files). I am using qt 3.3 . Can anybody help me out . Thanking you..
try this
Qt Code:
QStringList list; list << "abc" << "def"; for (int i = 0; i < str.length(); ++i) cout << str.at(i); }To copy to clipboard, switch view to plain text mode
Qt Assistant -- rocks!
please, use tags [CODE] & [/CODE].
Thanks spirit...It is reading character by character. But it is not reading end of line character('\n'). How can we modify the code so that we can read end of line character also..Thanking you again...
for docs
read this for more info.... The QChar array of the QString (as returned by unicode()) is generally not terminated by a '\0'. If you need to pass a QString to a function that requires a C '\0'-terminated string use latin1()...
Qt Assistant -- rocks!
please, use tags [CODE] & [/CODE].
Thanks spirit ....That did it.....Thank you very much.....
Bookmarks