Push Notifications to the QGIS User Interface
You will need to add this line of code to the imports near the top of the file.
from qgis.utils import *
def run(self): """Run method that performs all the real work""" # Create the dialog with elements (after translation) and keep reference # Only create GUI ONCE in callback, so that it will only load when the plugin is started if self.first_start == True: self.first_start = False self.dlg = OsoPluginDialog() # show the dialog self.dlg.show() # Run the dialog event loop result = self.dlg.exec_() # See if OK was pressed if result: # Do something useful here - delete the line containing pass and # substitute with your code. fieldName = self.dlg.mFieldComboBox.currentField() iface.messageBar().pushMessage("Field Name", fieldName, level=0) pass