On Monday 26 November 2007, Phil Thompson wrote:
> On Monday 26 November 2007, Luca Bedogni wrote:
> > Hi
> >     I made a qt4 app with designer-qt, then converted with
> >      pyuic4 interface.ui -o interface.py
> > Then, from my app, I do:
> > #!/usr/bin/env python
> >
> > import sys
> > import os
> > from interface import Ui_Dialog
> > from PyQt4 import QtGui,QtCore
> >
> > if __name__ == "__main__":
> >
> >   app = QtGui.QApplication(sys.argv)
> >
> >   MainForm = QtGui.QWidget()
> >   form = Ui_Dialog()
> >   form.setupUi(MainForm)
> >   MainForm.show()
> >
> >   app.exec_()
> >
> > but when i ran it I got:
> > [EMAIL PROTECTED]:~/pyqt$ ./prova.py
> > Traceback (most recent call last):
> >   File "./prova.py", line 15, in ?
> >     form.setupUi(MainForm)
> >   File "/home/bedo/pyqt/interface.py", line 36, in setupUi
> >
> > QtCore.QObject.connect(Dialog,QtCore.SIGNAL("accepted()"),Dialog.accept)
> > AttributeError: accept
> > [EMAIL PROTECTED]:~/pyqt$
> >
> > Where am I wrong?
> >
> > TIA
>
> Shouldn't MainForm be a QDialog?

Yes it could be, but I got the same problem with QDialog too.

> Phil

Thanks
-- 
Debian Powered GNU/Linux User #373118
Bedogni Luca -  Blog | http://blog.lucabedogni.it
                        Site | http://www.lucabedogni.it
Debianizzati - www.debianizzati.org | Founder Member
--
All undetectable errors will be treated as if no error occured. (IBM)  

Attachment: signature.asc
Description: This is a digitally signed message part.

_______________________________________________
PyQt mailing list    [email protected]
http://www.riverbankcomputing.com/mailman/listinfo/pyqt

Reply via email to