On Wed, Sep 15, 2010 at 8:19 PM, Tyler Wilson <[email protected]> wrote: > I thank you for your contribution of this code snippet. I myself am > testing a PyQt application I have been working on with PySide. I > currently use this PyQt code to load the GUI: > > ui_class, widget_class = uic.loadUiType("gui.ui") > self.ui = ui_class() > self.ui.setupUi(self) > > I have also used the loadUi like so: > > self.ui = uic.loadUi("gui.ui") > > but with the latter I was unable to get the slots auto-hooked up. (I > may have been missing the connectSlotsByName. I will review later.) > > Using your code worked to load the UI and make the proper parent/child > relationships, so that we can do things like: > > self.ui.myWidget > > The issue I see is that all the objects are of type QWidget, so we > cannot make specific calls to derived class methods, like: > > self.ui.myList.addItems(myList) # myList is a QListWidget > > This may be an issue with the PySide QUiLoader - I have not dug deep > enough. But I suspect somebody on this list can pipe in with the > answer very quickly.
You are right. After talking about this on IRC with Renato, I'v filed a bugreport about this. http://bugs.openbossa.org/show_bug.cgi?id=360 Thx for trying it! _______________________________________________ PySide mailing list [email protected] http://lists.openbossa.org/listinfo/pyside
