[PyQt] Bug report: The calendarwidget.py example is broken in PyQt5

Russell Warren russ at perspexis.com
Thu Feb 12 01:42:58 GMT 2015


It uses QLocale.countriesForLanguage, which is now obsolete [1].  It needs
to be adapted for QLocale::​matchingLocales.

$ ./calendarwidget.py
Traceback (most recent call last):
  File "./calendarwidget.py", line 414, in <module>
    window = Window()
  File "./calendarwidget.py", line 58, in __init__
    self.createGeneralOptionsGroupBox()
  File "./calendarwidget.py", line 191, in createGeneralOptionsGroupBox
    countries = QLocale.countriesForLanguage(lang)
AttributeError: type object 'QLocale' has no attribute
'countriesForLanguage'

[1]: http://doc.qt.io/qt-5/qlocale-obsolete.html
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20150211/f4a573e9/attachment.html>


More information about the PyQt mailing list