Guys, I was wrong (again). You can set a QMainWindow to modal using setWindowModality(). The code below works for me in Maya:
class MyApp(QtGui.QMainWindow): def __init__(self, parent=None): super(MyApp, self).__init__(parent) self.centralWidget = QtGui.QWidget(self) self.setCentralWidget(self.centralWidget) self.mainLayout=QtGui.QVBoxLayout(self.centralWidget) self.list_widget = QtGui.QListWidget() self.mainLayout.addWidget(self.list_widget) my_app = MyApp( parent=QtGui.QApplication.activeWindow() ) my_app.setWindowModality(QtCore.Qt.WindowModal) my_app.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_maya+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/CAD%3DwhWMKmYNAy3CpUtPnmA_T5HSv3TJ02j4iQmNy8uN0Q7JnYA%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.