[PyKDE] PyKDE2 alphas6 release/BUGS

Jim Bublitz jbublitz at nwinternet.com
Wed Feb 20 06:14:15 GMT 2002

On 19-Feb-02 Diez B. Roggisch wrote:
> When trying to run ttestPyKDE2.py, it complains 
> "QPaintDevice: Must construct a QApplication before a
> QPaintDevice."
> Any suggestions?

Here's my long embarassing story: I was having the same problem you
were having. I'm not sure if that means I forgot to test the
KDE2.2.2 version, or just did something in the interim to screw it
up. Anyway, I went to redo the 'make install' step, and then found
out I did it from the wrong subdirectory, so I screwed up the
entire installation. When I went to re-install from the correct
subdirectory, I found I no longer had the object files/libs there,
so I had to rebuild. While rebuilding I checked all of the source
code (KApplication () is what was failing, and the code is
identical in all versions). On a whim, I renamed /opt/kde (KDE1) to
/opt/kdexx and renamed libqt.so and libqt.so.1 (Qt1) to xxlibqt.so
and xxlibqt.so.1. When I went to do 'make install' after the build,
the install failed on libqt.so.1. So now I have to rebuild again.

Checking config.log, there is no apparent reason why libqt.so.1 is
getting linked in, and in fact when I did the alpha5 release
(KDE2.2.1) I know I ran the example and test programs and had them
work. I also had a lot of trouble getting the right version of
'moc' to work on this same installation a few months ago (it's

Considering the way I screwed up the whole bug-hunting process, my
results aren't conclusive, but I suspect you are also getting the
same link error because 1. the code is identical in all versions;
2. the error message (QPaintDevice ...) indicates something
graphical happening, and their is nothing graphical going on prior
to or at the point of failure (I traced most of the code to be
sure). Therefore, the indication is some kind of install/linkage
failure, and in my case that seems to be the problem.

I'd suggest you try the same thing I did (rename the Qt1 libs at
least temporarily - they should be in /usr/lib), and re-try 'make
install'. I expect you'll see the same failure. Sorry for all the
install problems you're having - as a user this kind of thing
really annoys me. I just hope we've found a fix finally.

This is apparently a problem with libtool and not with autoconf
(autoconf firmly believes it should be using Qt2), and I don't have
enough familiarity with libtool to know if/how this is preventable.
If someone has some knowledge in this area, I'd appreciate a hand.

(I am assuming this will all work after the next rebuild - if not,
I'll keep on at it)


More information about the PyQt mailing list