[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">&lt;<a \
href="mailto:phil@riverbankcomputing.com" \
target="_blank">phil@riverbankcomputing.com</a>&gt;</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 &lt;<a \
href="mailto:chris@cjroebuck.com">chris@cjroebuck.com</a>&gt;<br>


wrote:<br>
<div><div class="h5">&gt; Using osx 10.8.3 I installed Qt5.1.0 beta1 using the binary \
installer,<br> then<br>
&gt; built sip 4.14.7 dev snapshot and PyQt5 against Qt5.1.0 beta1<br>
&gt;<br>
&gt; Using python3 I&#39;m getting the following error when I try to run this<br>
simple<br>
&gt; script:<br>
&gt;<br>
&gt; #!/usr/bin/env python<br>
&gt; from PyQt5.QtCore import *<br>
&gt; from PyQt5.QtGui import *<br>
&gt; from PyQt5.QtWebKit import *<br>
&gt; from PyQt5.QtNetwork import *<br>
&gt;<br>
&gt; QApplication.instance()<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; NameError: name &#39;QApplication&#39; is not defined<br>
&gt;<br>
&gt; Any ideas what i&#39;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