On Tue, Jan 6, 2015 at 5:04 AM, Suhail Mahmood
<[email protected]> wrote:
> self.recentFiles = settings.value("RecentFiles").toStringList()
> AttributeError: 'NoneType' object has no attribute 'toStringList'
This sounds to me like your RecentFiles setting doesn't exist yet. You
could try a two-step approach:
files = settings.value("RecentFiles")
if files: self.recentFiles = files.toStringList()
# else self.recentFiles = ... something else? ...
or you could look at the docs for your QSettings object and see if you
can provide a default for it to return. That might save you some
trouble.
ChrisA
--
https://mail.python.org/mailman/listinfo/python-list