[prev in list] [next in list] [prev in thread] [next in thread]
List: pykde
Subject: Re: [PyQt] [Mac] PyQt5 and Qt5.1.0 beta 1 - NameError: global name 'QApplication' is not defined
From: Chris Roebuck <chris () cjroebuck ! com>
Date: 2013-05-20 23:08:24
Message-ID: CAKrqgK9XxeDbe9v4YrgqfwMdYLb0x+Tu4edPGbg-PovZQekhXQ () mail ! gmail ! com
[Download RAW message or body]
[Attachment #2 (multipart/alternative)]
Thanks all
On 20 May 2013 22:12, Phil Thompson <phil@riverbankcomputing.com> wrote:
> On Mon, 20 May 2013 20:03:16 +0100, Chris Roebuck <chris@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
>
[Attachment #5 (text/html)]
<div dir="ltr">Thanks all</div><div class="gmail_extra"><br><br><div \
class="gmail_quote">On 20 May 2013 22:12, Phil Thompson <span dir="ltr"><<a \
href="mailto:phil@riverbankcomputing.com" \
target="_blank">phil@riverbankcomputing.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc \
solid;padding-left:1ex">On Mon, 20 May 2013 20:03:16 +0100, Chris Roebuck <<a \
href="mailto:chris@cjroebuck.com">chris@cjroebuck.com</a>><br>
wrote:<br>
<div><div class="h5">> Using osx 10.8.3 I installed Qt5.1.0 beta1 using the binary \
installer,<br> then<br>
> built sip 4.14.7 dev snapshot and PyQt5 against Qt5.1.0 beta1<br>
><br>
> Using python3 I'm getting the following error when I try to run this<br>
simple<br>
> script:<br>
><br>
> #!/usr/bin/env python<br>
> from PyQt5.QtCore import *<br>
> from PyQt5.QtGui import *<br>
> from PyQt5.QtWebKit import *<br>
> from PyQt5.QtNetwork import *<br>
><br>
> QApplication.instance()<br>
><br>
><br>
><br>
> NameError: name 'QApplication' is not defined<br>
><br>
> Any ideas what i'm missing?<br>
<br>
</div></div>from PyQt5.QtWidgets import QApplication<br>
<span class="HOEnZb"><font color="#888888"><br>
Phil<br>
</font></span></blockquote></div><br></div>
_______________________________________________
PyQt mailing list PyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic