Thanks Peter, <div>and sorry.</div><div><br></div><div>You were right, versions: Qt =  4.5.0 and PyQt = 4.7.7.</div><div><br></div><div>cheers</div><div>[]'s<br><br><div class="gmail_quote">On Wed, Oct 20, 2010 at 3:26 PM, Hans-Peter Jansen <span dir="ltr"><<a href="mailto:hpj@urpla.net">hpj@urpla.net</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">[please keep the mailing list cc'ed at least, and personal reply]<br>
<div class="im"><br>
On Wednesday 20 October 2010, 19:25:33 leo kirotawa wrote:<br>
> Sorry,<br>
> I should have  shown more details.<br>
> So, I installed the PyQt4.7.7 in my ubuntu 9.04 through this link<br>
> <a href="http://www.riverbankcomputing.co.uk/software/pyqt/download" target="_blank">http://www.riverbankcomputing.co.uk/software/pyqt/download</a>.<br>
><br>
> Installing this way the files come with a folder called examples in<br>
> it has a other folder called effect. In this folder has some samples<br>
> the app using the new classes Effect of PyQt4.7.7. When I tried run<br>
> the sample lighting.py it show this message:<br>
><br>
> File "lighting.py", line 66, in setupScene<br>
>     effect = QtGui.QGraphicsDropShadowEffect(self)<br>
> AttributeError: 'module' object has no attribute<br>
> 'QGraphicsDropShadowEffect'<br>
><br>
> So, my questions are: this trouble is cause my python version 2.6.2<br>
> or my ubuntu version 9.04? Or cause other reasons? For other examples<br>
> like : /examples/graphicsview/anchorlayout.py show the same message.<br>
><br>
> []'s<br>
<br>
</div>Here's the standard procedure in such cases:<br>
<br>
$ grep -r QGraphicsDropShadowEffect sip/<br>
sip/QtGui/qapplication.sip:        {sipName_QGraphicsDropShadowEffect, &sipType_QGraphicsDropShadowEffect, -1, 49},<br>
sip/QtGui/qgraphicseffect.sip:class QGraphicsDropShadowEffect : QGraphicsEffect<br>
sip/QtGui/qgraphicseffect.sip:    QGraphicsDropShadowEffect(QObject *parent /TransferThis/ = 0);<br>
sip/QtGui/qgraphicseffect.sip:    virtual ~QGraphicsDropShadowEffect();<br>
sip/QtGui/qgraphicseffect.sip:    QGraphicsDropShadowEffect(const QGraphicsDropShadowEffect &);<br>
<br>
Ergo, the class is defined in sip/QtGui/qgraphicseffect.sip.<br>
<br>
$ less sip/QtGui/qgraphicseffect.sip<br>
[...]<br>
%If (Qt_4_6_0 -)<br>
<br>
class QGraphicsEffect : QObject<br>
{<br>
%TypeHeaderCode<br>
#include <qgraphicseffect.h><br>
%End<br>
<br>
Ergo, QGraphicsEffect is available from Qt 4.6.0 onwards only.<br>
<br>
Let us see the output of:<br>
<br>
    try:<br>
        from PyQt4 import QtCore<br>
    except ImportError:<br>
        print "PyQt4 not installed"<br>
    else:<br>
        print "Qt4 version:", QtCore.QT_VERSION_STR<br>
        print "PyQt4 version:", QtCore.PYQT_VERSION_STR<br>
<br>
I would bet any money, that Qt is below 4.6.0. I have no idea, if any<br>
ubuntu repo has a newer Qt available.<br>
<br>
[To all you Ubuntu users out there: I'm willing to provide current PyQt<br>
related packages for your beloved OS, similar to what I provide for<br>
openSUSE here:<br>
<br>
<a href="https://build.opensuse.org/project/show?project=home%3Afrispete%3APyQt" target="_blank">https://build.opensuse.org/project/show?project=home%3Afrispete%3APyQt</a><br>
<a href="https://build.opensuse.org/project/show?project=home%3Afrispete%3APyQt-next" target="_blank">https://build.opensuse.org/project/show?project=home%3Afrispete%3APyQt-next</a><br>
<a href="https://build.opensuse.org/project/show?project=home%3Afrispete%3Apython3" target="_blank">https://build.opensuse.org/project/show?project=home%3Afrispete%3Apython3</a><br>
<br>
but it takes some form of funding for this, since it is a considerable<br>
amount of work to be done.<br>
<br>
The build service supports Ubuntu 8.04, 9.04, 9.10, and 10.04 ATM.]<br>
<br>
Please disregard this shameless advertising!<br>
<br>
A warning message for these cases wouldn't harm. How about providing us<br>
one as a janitorial task in return to be able to use this beautiful piece<br>
of code? [This is not meant as a joke!]<br>
<br>
Pete<br>
</blockquote></div><br><br clear="all"><br>-- <br>Leônidas S. Barbosa (Kirotawa)<br>[DesenvolvedorWeb/CEFET/RN]<br>[Ciências da Computação/UFRN]<br>[pós-graduando em Inteligência Computacional/Processamento Gráfico /UFRN<br>
[Estudante de japonês nível Intermediário I  - Japanese Student]<br>[Desenvolvedor em python, PyGame]<br>blog nerd: <a href="http://corecode.wordpress.com/" target="_blank">corecode.wordpress.com/</a><br>blog music: <a href="http://essenaomanja.blogspot.com" target="_blank">essenaomanja.blogspot.com</a><div>
blog tirinhas: <a href="http://elminiche.wordpress.com/" target="_blank">elminiche.wordpress.com/</a><br><br>"Mais sábio é aquele que sabe que não sabe" (Sócrates)<br><br>日本語の学生です。<br>コンピュータサイエンスの学位.<br></div><br>

</div>