vendredi 20 février 2015

How to import fromUtf8 in QGIS



# Declare instance attributes
self.actions = []
self.menu = self.tr(u'&City_searcher_plugin')
# TODO: We are going to let the user set this up in a future iteration
self.toolbar = self.iface.addToolBar(u'city_searcher_class')
self.toolbar.setObjectName(u'city_searcher_class')
QObject.connect(self.dlg.Statecombo, SIGNAL("currentIndexChanged(int)"), self.findTheCityNames)
QObject.connect(self.dlg.Citycombo, SIGNAL("currentIndexChanged(int)"), self.calcDistance)
QObject.connect(self.button_box, QtCore.SIGNAL(_fromUtf8("accepted()")), self.buffer)
#QObject.connect(self.dlg.browsepushButton, SIGNAL("clicked()"), self.saveTheFile)


In the above snippet, I used fromUtf8. But it is saying an error fromUtf8 is not defined. Where should I import fromUtf8 like from qtgui or qtcore?





Aucun commentaire:

Enregistrer un commentaire