What is the best way of saving and restoring the contents of a QTableWidget into QSettings? Saving and restoring every single item would take a while, is there anything else?
Thanks in advance ~codeslicer
What is the best way of saving and restoring the contents of a QTableWidget into QSettings? Saving and restoring every single item would take a while, is there anything else?
Thanks in advance ~codeslicer
You can use a proper model, for example onebased on a stringlist and then save the stringlist to settings. But it will take the same amount of time as storing each item manualy.
codeslicer (6th April 2008)
Ok thanks, I was just wandering if there was a way of taking out one huge piece of "data" from the QTableWidget and just stuffing it into QSettings. But I guess I'll just create a parser script which will check a folder in QSettings for any values.
Thanks again
There is no single piece of data in QTableWidget. It consists of separate items. If you had a proper model, you could implement it in such a way that all data would be stored in a list that you could simply redirect to QSettings.
Bookmarks