Hi,
How can I make a QFile visible in multiple functions/methods? In other words I would like to create a QFile and be able to use the same name in multiple places, for instance the save and load functions.
I have tried…
.h
private:
QFile myFile(QString);
.cpp
//constructor
myFile("/Users/userName/someFile.txt");
later in the program
if (myFile.open(QIODevice::WriteOnly))
...
Which of course doesn’t work, I know this has to do with my poor understanding of the language C++.
Thanks a lot
↧