0

PySide QApplication empty

Hi,

 I would like to retrieve the list of widgets in the application so I used the following code in python. Unfortunately, the call to allWidgets actually returns a list of empty string: [,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,]. The QApplication.instance() also returns an empty value.

def get_main_window(self):
widgets = QtGui.QApplication.instance().allWidgets()
print widgets
for wid in widgets:
if not isinstance(wid, QtGui.QMainWindow):
continue
return wid

2 comments

  • 0
    Avatar
    Christophe Tornieri

    I am using RV 6.4.2 win64 IA32_64 build.

  • 0
    Avatar
    Jon Morley

    Hi Christophe,

    I think there is something not quite right about PySide and QWidget names. Have you seen this forum post?

    https://support.shotgunsoftware.com/entries/96056447

    Please make sure to read all the way to the end.

    Thanks,
    Jon

Please sign in to leave a comment.