[PyQt] [Mac] PyQt5 and Qt5.1.0 beta 1 - NameError: global name 'QApplication' is not defined
Chris Roebuck
chris at cjroebuck.com
Tue May 21 00:08:24 BST 2013
Thanks all
On 20 May 2013 22:12, Phil Thompson <phil at riverbankcomputing.com> wrote:
> On Mon, 20 May 2013 20:03:16 +0100, Chris Roebuck <chris at cjroebuck.com>
> wrote:
> > Using osx 10.8.3 I installed Qt5.1.0 beta1 using the binary installer,
> then
> > built sip 4.14.7 dev snapshot and PyQt5 against Qt5.1.0 beta1
> >
> > Using python3 I'm getting the following error when I try to run this
> simple
> > script:
> >
> > #!/usr/bin/env python
> > from PyQt5.QtCore import *
> > from PyQt5.QtGui import *
> > from PyQt5.QtWebKit import *
> > from PyQt5.QtNetwork import *
> >
> > QApplication.instance()
> >
> >
> >
> > NameError: name 'QApplication' is not defined
> >
> > Any ideas what i'm missing?
>
> from PyQt5.QtWidgets import QApplication
>
> Phil
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20130521/3b47aed8/attachment.html>
More information about the PyQt
mailing list