I'd like to get a little more control over the layout and functionality of the user interface associated with a processing script I've created. I've made a ui file using Qt Designer, but I can't figure out how to replace the default form (which uses the ## notation to define parameters) with my new one.

I've found many examples on doing this for a plugin and for feature popups, but nothing for processing scripts.

I tried the following but I just get a blank dialog

from PyQt4 import uic

myForm = uic.loadUi('path_to_ui.ui')

enter image description here

1 Answer 1


I found that if I made a widget class and put the original code inside it, I can get the form to show as expected. Not sure if this is the best way as I'm still quite new to PyQGIS and coding in general.

from PyQt4 import QtGui, uic

class MyWidget(QtGui.QWidget):
    myForm = uic.loadUi('path_to_ui.ui')

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.