On Thu, 19 Nov 2009 13:45:31 -0800 (PST), dizou <di_...@yahoo.com> wrote: > I have a class Dialog inheriting a QDialog: > > def Dialog(QDialog): > def __init__(self, parent): > QDialog.__init__(self, parent) > > I have a MainWindow class that inherits QMainWindow that creates the Dialog > class: > > class MainWindow(QMainWindow): > def __init__(self): > #stuff > def MyFunction(): > dialog = Dialog(self) > print type(dialog) > dialog.exec_() > > When MyFunction is called I get this output and error: > > <type 'NoneType'> > ... > AttributeError: 'NoneType' object has no attribute 'exec_' > > I guess the QDialog isn't being initialized right? How do I fix this?
First you post a short, complete example program that demonstrates the problem. Then we point out the bug in your example. Phil _______________________________________________ PyQt mailing list PyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt