class LayerInfoWidget(QtGui.QWidget):
def __init__(self, parent = None):
super(LayerInfoWidget, self).__init__(parent)
self.hLayout = QtGui.QHBoxLayout(self)
self.label = QtGui.QLabel(self)
self.label.setText('Pass Name Here')
self.enabled = QtGui.QCheckBox(self)
self.enabled.setChecked(True)
self.frameList = QtGui.QLineEdit(self)
self.frameList.setText('1-10')
self.passName = QtGui.QLineEdit(self)
self.passName.setText('Filename - PASS')
self.hLayout.addWidget(self.label)
self.hLayout.addWidget(self.enabled)
self.hLayout.addWidget(self.frameList)
self.hLayout.addWidget(self.passName)
self.setLayout(self.hLayout)
mainwin = QtGui.QMainWindow()
vLayout = QtGui.QVBoxLayout(mainwin)
mywidget = LayerInfoWidget(parent=mainwin)
vLayout.addWidget(mywidget)
mainwin.setLayout(vLayout)
mainwin.show()
mainwin.raise_()
QMainWindow is for special circumstances where the layout and contents of your window fits with the Qt concept of what a “Main Window” is, which is this.

If you aren’t interested in most of that, then QDialog is probably what you want instead.
To answer your question, you’ll need to assign the “central widget”, like this:
...
centralwidget = QtGui.QWidget()
mainwin = QtGui.QMainWindow()
mainwin.setCentralWidget(centralwidget)
vLayout = QtGui.QVBoxLayout(centralwidget)
mywidget = LayerInfoWidget(parent=mainwin)
vLayout.addWidget(mywidget)
mainwin.show()
mainwin.raise_()
--
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+unsub...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/6b9b3864-1a4c-43f1-9c1a-23e54bd73bb1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.