listWidget = QtGui.QListWidget(container)class ListWindow(QtGui.QMainWindow):
  refreshClicked = Signal(list)def refresh():
    window.refreshClicked.emit(listWidget.item())
  button.clicked.connect(refresh)    def refresh():
     Â
      listWidget.clear()
      items = pmc.selected()
      for item in items:
        newItem = QtGui.QListWidgetItem( item.nodeName())
        listWidget.addItem(newItem)
      print 'Print statement is Working...'
    _window.refreshClicked.connect(refresh)import uiCode
def main():
app = QtGui.QApplication(...) # if not maya
win = uiCode.ListWindow()
# .. bunch of setup you want to do with win
win.show()
app.exec_() # if not maya
--
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 python_inside_m...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/33a46e73-5745-45aa-b4e4-d1810e28d152%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
window = None
def show():
  global _window
  if _window is None:
    cont = uiCode.ListWindowController()
    def refresh():
      listWidget.clear()
      items = pmc.selected()
      for item in items:
        newItem = QtGui.QListWidgetItem( item.nodeName())
        listWidget.addItem(newItem)
      print "This printed fine...
    _window.refreshClicked.connect(refresh)
  _window.show()--
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 python_inside_m...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/fa880722-405e-4d0d-8a2a-1ab1b8e3e04a%40googlegroups.com.
Hahaha wacky :-) sorry I thought it was funny. I'll be able to post in an out an hours time. A little busy. Thanks for the help Justin
Padraig
## uiCode.py
class ListWindow(QtGui.QMainWindow):
refreshClicked = Signal(list)
def __init__(self, controller, parent = None):
super(ListWindow, self).__init__(parent)
self.setWindowTitle('Padraigs List')
# ..
container = QtGui.QWidget(self)
# ...
self.listWidget = QtGui.QListWidget(container)
# ...
## mainCode.py
#...
def refresh():
_window.listWidget.clear()
## uiCode.py
class ListWindow(QtGui.QMainWindow):
refreshClicked = Signal(list)
def __init__(self, controller, parent = None):
super(ListWindow, self).__init__(parent)
self.setWindowTitle('Padraigs List')
# ..
container = QtGui.QWidget(self)
# ...
self.__listWidget = QtGui.QListWidget(container)
# ...
def clearList(self):
self.__listWidget.clear()
## mainCode.py
#...
def refresh():
_window.clearList()
def refresh():
window.refreshClicked.emit(list)
button.clicked.connect(refresh)
--
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 python_inside_m...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/5fb6eb90-d201-46ed-87fb-dcaed8c4e8f0%40googlegroups.com.
bah i tried both way and got confused where to put what the code changed accordingly but the items never returned to me in the listWidget further more i got no errors. its like the function didn't exist
--
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 python_inside_m...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/c7c5fae0-9c23-44a5-a0b9-8b7a744fe3af%40googlegroups.com.
would those methods not invalidate the Signal, but what you are doing is rather just calling up a function?
On Wednesday, 9 December 2015 22:49:44 UTC-8, Padraig Ó CuÃnn wrote:bah i tried both way and got confused where to put what the code changed accordingly but the items never returned to me in the listWidget further more i got no errors. its like the function didn't exist
--
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 python_inside_m...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/84b03830-b00b-4604-a95a-c55349744ae1%40googlegroups.com.
On Fri, 11 Dec 2015 4:16 PM Padraig Ó CuÃnn <patchquin...@gmail.com> wrote:
Hey the emit list was a coding typo, I wasnt really sure on what to do with it as you have a different setup than custom signals
You can just put nothing there for arguments. When you define a custom signal, you can tell it what types it expects to emit.
--
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 python_inside_m...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/5a4a4482-210a-458b-9cb4-c73d06f38a5e%40googlegroups.com.
I've given it a second try and recode everything. I'll have another paste bin for you tomorrow. But as of right now I am getting weird errors that say __init__ only takes 2 arguments 3 given. I only used 2. And another saying emit is not an identified argument of signal :-/
Padraig
HI again I am finally getting somewhere,Â
def reList():
_window.listWidget.clear()
items = pmc.selected()
for item in items:
newItem = QtGui.QListWidgetItem(item.nodeName())
_window.listWidget.addItem(newItem)
Ive no idea what it is but it will only add them to the widget on first launch and not by the refreshbutton signal to the reList function above