[PyKDE] Help: PyQt compilation errors

Jim Bublitz jbublitz at nwinternet.com
Tue Nov 6 20:13:53 GMT 2001


On 06-Nov-01 Luca Fini <lfini at arcetri.astro.it> wrote:

> When compiling PyQt I get a compilation error. I tried to keep
> everything aligned as suggested in many posts relating to
> similar problems, but something must be wrong all the same. I
> installed sip 2.4 with no problems.

> I'm running Linux RedHat 7.0 with gcc patched to the latest
> upgrades.
 
> Here follows more details:
 
> 1. Error message (it is the second compile command after the
> "make"):
 
> c++ -DHAVE_CONFIG_H -I. -I. -I.. -I/usr/include/python2.1
> -I/usr/local/include/sip -I/usr/lib/qt-2.2.0/include
> -I/usr/X11R6/include
> -fno-exceptions -O2 -c qtcmodule.cpp  -fPIC -DPIC -o qtcmodule.lo
> qtcmodule.cpp: In function `PyObject *registerClasses (PyObject
> *, PyObject *)':
> qtcmodule.cpp:9179: `Rounded' is not a member of type
> `QTabWidget'
> qtcmodule.cpp:9180: `Triangular' is not a member of type
> `QTabWidget'
> qtcmodule.cpp:10388: `TSCII' is not a member of type `QFont'
> qtcmodule.cpp:10661: `AccelOverride' is not a member of type
> `QEvent'
> qtcmodule.cpp:11295: `WGroupLeader' is not a member of type `Qt'

These all look like enum elements that gcc isn't able to locate in
the Qt .h files.

I don't have Qt2.2.0, so I can't verify whether these enum values  
are in Qt2.2.0 or not. Could you check the Qt docs and see if the
TabShape enum is included in QTabWidget (and similarly for the
other errors)? According to the QTabWidget sip file,  the TabShape
enum was introduced with Qt2.2.0, but this (and the other stuff)
could be version-related errors in the sip files.

The simplest fix would be to download a more recent version of Qt
(2.3.0 or 2.3.1 - don't know if the just-released 2.3.2 will work
or not) and maybe sip/PyQt 2.5 (and notice that you have to download
a PyQt version to match your Qt version). PyQt2.5 will still expect
to find the TabShape enum in QTabWidget, and probably the others as
well. I would think Red Hat's FTP site would have more current Qt
versions.

If PyQt is incorrect in expecting to find these enum elements in
Qt2.2.0, please post the information so PyQt can be fixed (but
you'll get running more quickly if you can upgrade Qt - a fix will
probably take a few weeks).

Jim




More information about the PyQt mailing list