0

I am moving from PyQt to PySide. I have been used to load my Qt Designer generated ui files in __init__ like this:

def __init__(self):
    QtGui.QMainWindow.__init__(self)
    uic.loadUi("mygui.ui", self)

    self.mywidget.do_some_other_stuff()

    self.show()

Can this be done with PySide? The closest I've come to is

    self.widget = QtUiTools.QUiLoader().load("mygui.ui"))
    self.setCentralWidget(self.widget)

but my MatplotlibWidget won't show and none of my slots are working.

pacholik
  • 8,607
  • 9
  • 43
  • 55
  • possible duplicate of [Loading QtDesigner's .ui files in PySide](http://stackoverflow.com/questions/7144313/loading-qtdesigners-ui-files-in-pyside) – Andrzej Pronobis Jun 12 '15 at 17:19
  • There is no exact equivalent in PySide, so you'd have to [write your own](http://stackoverflow.com/a/27610822/984421). – ekhumoro Jun 12 '15 at 19:13

1 Answers1

0

There's implementation of loadUi for PySide in qtpy abstraction layer.

Winand
  • 2,093
  • 3
  • 28
  • 48