Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #83250

toStringList in PyQt5

Newsgroups comp.lang.python
Date 2015-01-05 10:04 -0800
Message-ID <fab6a2bc-051f-42fa-a0f0-4dd6d6d87752@googlegroups.com> (permalink)
Subject toStringList in PyQt5
From Suhail Mahmood <suhailmahmood.c070@gmail.com>

Show all headers | View raw


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 

            settings.value("Recent files").toStringList()

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?
Thanks.

Back to comp.lang.python | Previous | Next — Next in thread | Find similar | Unroll thread


Thread

toStringList in PyQt5 Suhail Mahmood <suhailmahmood.c070@gmail.com> - 2015-01-05 10:04 -0800
  Re: toStringList in PyQt5 Chris Angelico <rosuav@gmail.com> - 2015-01-06 08:40 +1100

csiph-web