[PyQt] [Mac] PyQt5 and Qt5.1.0 beta 1 - NameError: global name 'QApplication' is not defined

Chris Roebuck chris at cjroebuck.com
Mon May 20 20:03:16 BST 2013


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?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20130520/9f226633/attachment.html>


More information about the PyQt mailing list