Dilshad
4th January 2011, 11:14
Hi,
I have a query regarding Files and textstream in QT
if I have a code such as the following :
QFile file("abc.txt");
file.open(QIODevice::ReadOnly);
QTextStream(&file);
file.setFileName("xyz.txt");
file.open(QIODevice::ReadOnly);
In the above case what should QTextstream be pointing at?
Contents of "abc.txt" or "xyz.txt"
In my case it points to "abc.txt"
Is there any way I can change it to point to "xyz.txt"?
Thank you in advance.
I have a query regarding Files and textstream in QT
if I have a code such as the following :
QFile file("abc.txt");
file.open(QIODevice::ReadOnly);
QTextStream(&file);
file.setFileName("xyz.txt");
file.open(QIODevice::ReadOnly);
In the above case what should QTextstream be pointing at?
Contents of "abc.txt" or "xyz.txt"
In my case it points to "abc.txt"
Is there any way I can change it to point to "xyz.txt"?
Thank you in advance.