Open alberto-bueno opened 7 years ago
Hi,
so with pyQt and Qt 4.8 on my system, QLineEdit.text() returns a unicode string. But in your case it returns a QString. the simple fix then is to replace all the ".encode('utf8')" by the equivalent for Qstring that is ". toUtf8 http://pyqt.sourceforge.net/Docs/PyQt4/qstring.html#toUtf8()"
I believe this is due to one of the joy of PyQt/Qt: ever changing definitions breaking backward compatibility to keep you busy! Yeah!
Regards, Maxime
sorry it included the link, I meant ".toUtf8()"
I normally run your program using spyder. But now I am migrating towards Visual Studio with Python tools 2015. Every time I launch PyGMI_Launcher.py I receive the following error:
self.config_dict['macfold']=self.ui.macfold.text().encode('utf'8) AttributeError: 'Qstring' object has no attribute 'encode'