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/b72ea676-b566-4d1c-8fd5-9fb4f823aa7c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to