[PyKDE] Loading of plugins when embedding python
Ricardo Javier Cardenes Medina
rcardenes at debian.org
Sun Aug 10 16:31:01 BST 2003
On Sun, Aug 10, 2003 at 03:40:51PM +0200, Manuel Klimek wrote:
> I've got a plugin with the sgi style in the usual qt plugins style directory.
> So usually Qt loads those plugins by default, doesn't it?
> Either that, or should PyQt libs link against the appropriate plugin
> libraries (?)
> I read that I can disable styles in the $QTDIR/include/qconfig.h,
> but that would be a workaround, and not a solution, because the
> installation doesn't seem to be broken: The plugin libraries are there...
>
> Now, is this a problem, or is it just a broken debian qt package?
Broken Trolltech configure. It doesn't generate the appropriate
#define's when building Qt, fooling PyQt (and others) into thinking that
there are symbols available for some classes that really aren't there.
It's a problem only (AFAIK) for Debian and Mandrake, as others build
those symbols into the main Qt lib. You need to create a custom
"features" file like this:
-x Qt_STYLE_CDE
-x Qt_STYLE_MOTIFPLUS
-x Qt_STYLE_MOTIF
-x Qt_STYLE_PLATINUM
-x Qt_STYLE_SGI
-x Qt_STYLE_WINDOWS
I also add this to the build.py on Debian's packages:
---8<------8<------8<------8<------8<------8<------8<------8<------8<------8<---
--- python-qt3-3.7.orig/build.py
+++ python-qt3-3.7/build.py
@@ -1185,11 +1185,33 @@
proPatches["DEBUG"] = [re.compile("@BL_DEBUG@",re.M), debugMode]
+# BEGIN DEBIAN SPECIFIC
+ if mname == "qt":
+ noStyles = " ".join([
+ "QT_NO_STYLE_CDE",
+ "QT_NO_STYLE_MOTIFPLUS",
+ "QT_NO_STYLE_MOTIF",
+ "QT_NO_STYLE_PLATINUM",
+ "QT_NO_STYLE_SGI",
+ "QT_NO_STYLE_WINDOWS" ])
+ proPatches["MYDEFINES"] = [re.compile("(^DEFINES.*)$",re.M),
+ "\\1 " + noStyles]
+ if mname == "qtgl":
+ makefilePatches["NOGLU"] = [re.compile("-lGLU",re.M), ""]
+# END DEBIAN SPECIFIC
+
if catCppFiles:
catFiles(mname)
buildMakefile(pro)
+# BEGIN DEBIAN SPECIFIC
+ if mname == "qt":
+ del proPatches["MYDEFINES"]
+ if mname == "qtgl":
+ del makefilePatches["NOGLU"]
+# END DEBIAN SPECIFIC
+
fixInstallTarget(mname)
del proPatches["TARGET"]
--->8------>8------>8------>8------>8------>8------>8------>8------>8------>8---
More information about the PyQt
mailing list