never mind......
a = QtGui.QListWidget(self.listCategory.addItems(category)) Sorry for the noise regards stefan On Sunday, April 27, 2014 2:41:39 PM UTC+1, [email protected] wrote: > > Hi Guys! > > I'm trying to learn how to use ui files instead of converting the ui files > to python all the time. I use Nathan's > http://dl.dropboxusercontent.com/u/1633130/PyQt%20tuts/PySide_loadUiType.py(but > import it as "uic") > > > # --------------- file called myAwesome.py > __uiFile__ = path/ui.ui > > form_class, base_class = uic.loadUiType(__uiFile__) > > class AweSome(form_class, base_class): > def __init__(self, parent=None): > super(AweSome, self).__init__(parent) > self.setupUi(self) > #--------------------------------------------------------- > > import myAwesome > a = myAwesome.AweSome() > a.show() > > So that works and I see my ui. And I can also connect signals to my > buttons using > > self.btnPressMe.connect.clicked(self.btnPressMe_clicked()) > > But how to I populate QListWidgets? I normally get a list using this > command. > > category = [folder for folder in os.listdir(self.ASSETPATH) if > os.path.isdir(os.path.join(self.ASSETPATH,folder))] > > and then use: self.categorys.addItems(category) > > But how to I use the QtGui.QListWidget.addItems() command now that I > import my ui file? Does it make sense? Sorry for the n00b quesiton about > this. > > regards > stefan andersson > > > -- You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/7c0a0efe-0abc-434e-acc1-25a0193d8885%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
