qt and python

Bob File rfile at innet.com
Mon Apr 30 21:07:32 EDT 2001


Well, I've been loading new software and I seem to have broken PyQt
I started out with SuSE 7.1

After updating kde and QT to 2.1 and 2.3 respectively I get errors when 
I run any python file that imports qt as in:
from qt import *
When I try to run the file it tells me that Q(whatever) is not a 
variable. example:
NameError: There is no variable named 'QApplication'
When I use the path browser built into idle those classes seem to be 
there.
In fact it seems to appear in 2 places in the path browser.
There is a qt.py file in /usr/lib/python2.0 and 
/usr/lib/python2.0/site-packages

So do I need a path fix or what? The latest PyQt won't compile on my 
system. The page I got PyQt 2.4 from said to install sip also and it 
compiled fine and put itself in /usr/local.
PyQt gives me an error I cannot understand.

In file included from qtcmodule.cpp:4099:
sipqtProxyqt.moc:45: new declaration `static void 
sipProxyqt::staticMetaObject()'
sipqtProxyqt.h:36: ambiguates old declaration `static class QMetaObject 
* sipProxyqt::staticMetaObject()'
sipqtProxyqt.moc: In function `void 
__static_initialization_and_destruction_0(int, int)':
sipqtProxyqt.moc:29: no matching function for call to 
`QMetaObjectInit::QMetaObjectInit (QMetaObject * (*)())'
/usr/lib/qt-2.3.0/include/qmetaobject.h:259: candidates are: 
QMetaObjectInit::QMetaObjectInit(void (*)())
/usr/lib/qt-2.3.0/include/qmetaobject.h:261:                 
QMetaObjectInit::QMetaObjectInit(const QMetaObjectInit &)
make[2]: *** [qtcmodule.lo] Error 1
-- 
What Now?



More information about the Python-list mailing list