I know I can disable the dial widget from the main function that loads the Qt dialog form with self.dial_name.setEnabled(False) but don't want to modify the function, to keep all modifications separated.

What is the best way, I don't see options to do it from the .ui file itself, so maybe there is some 'onload' event for the widgets, something like:

def on_dial_name_loaded(self):

Or a trick to replace the self by qgis.something.dial_name.setEnabled(False) outside a function?

  • What main function? Apr 22, 2022 at 12:54
  • The main function is the _ init _ function of the class that builds the Qt form for the plugin, Instead of disabling the dial from there I'd prefer to keep my own code separate, mainly for maintenance. Sorry for the 'qml' in the OP, I removed it...
    – S.E.
    Apr 22, 2022 at 19:00


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Browse other questions tagged or ask your own question.