toStringList in PyQt5
suhailmahmood.c070 at gmail.com
Mon Jan 5 19:04:54 CET 2015
I was following the examples in 'Rapid GUI Development with Python and Qt' by Mark Summerfield. Sadly I am using PyQt5 and all the examples in this book are for PyQt4. But I have converted the codes to PyQt5 codes. But still I am having some problems. In chapter 6, there is something called QString, which I can't import(I guess this is more available in Pyqt5). Also, there is QSettings, returning something in by using
where settings is an instance of QSettings. Now as I can't import QString, this line is giving me an error like this:
self.recentFiles = settings.value("RecentFiles").toStringList()
AttributeError: 'NoneType' object has no attribute 'toStringList'
How can I get around with this problem?
More information about the Python-list