Having trouble with a personal (inherited) plugin that has a lot of the following calls
Code:
return unicode(self.lineedit.text().toUtf8(), 'utf8').strip()
that work with Qt4 but not with Qt5 (self.lineedit is a QLineEdit object. if that wasn't clear). I get the following error under Qt5:
Code:
unicode object has no toUtf8 attribute
I was thinking this might fall under the QVariant conversion portion of your porting guide (toInt, toBool, etc), but wasn't certain if I should utilize your convert_qvariant() solution for that, or if there's just some plain overkill going on in the original code that could be fixed with something like:
Code:
return unicode(self.lineedit.text()).strip()
Thanks for any advice.
**NOTE: these values from the QLineEdit objects may contain non-ascii characters and will eventually be saved/retrieved in/from the plugin's JSON prefs file if that has any bearing at all.