I've got a QList of QLineEdit*'s
QList<QLineEdit*> example;
Example will hold 100 items of lineEdits.
When I try to save or load to a file, it fails to save or load the QList
properly, if at all. I get a much lower than expected count of data.
I see on QList<T>
's resource page here that there's the correct operator for << & >>,
however I can't seem to get them to save to a file using QDataStream
I've also tried copying all the "text()" values from the LineEdits into a seperate String List but I still can't save them to a file. Any help would be appreciated.
EDIT: Looks like that did it. This is how I'm reading them back, is there a more simple approach to this, or have I pretty much covered it?
//memoryAddresses
for(int i = 0; i < 100; i++)
{
QString temp;
loadFile >> temp;
memAddr.at(i)->setText(temp);
}