How can I include a form created in Designer in my QGIS plugin?
And how to get controls values (textbox,label,etc)?
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It only takes a minute to sign up.Sign up to join this community
One approach is to load the .ui file dynamically:
# load the form path = os.path.dirname( os.path.abspath( __file__ ) ) self.optionsDialog = uic.loadUi(os.path.join(path,"options.ui")) # restore some options self.optionsDialog.spinBoxFrameLength.setValue(2) self.optionsDialog.checkBoxBackwards.setChecked(True) # show dialog self.optionsDialog.show()
You can have a look at the corresponding full source code here: https://github.com/anitagraser/TimeManager/blob/master/timemanagerguicontrol.py