[PyQt] Goods news about the "menu text missing in PyKDE apps with
phil at riverbankcomputing.com
Thu Apr 10 21:41:53 BST 2008
On Thursday 10 April 2008, Simon Edwards wrote:
> Hello all,
> Some people here might have crossed paths with the "menu text missing in
> PyKDE apps with Oxygen" bug. Basically menu labels are not rendered when
> a PyKDE4 application is used with the Oxygen widget style. After quite a
> lot of hair-pulling work over the last few days I've figured out what
> the problem is.
> First, a solution. Put the following lines in your PyKDE4/__init__.py
> file in your Python installation's site-packages directory. (typically
> import sys, dl
> I'm sure what the 'official' solution is going to be, but Jim and I will
> work it out. This _might_ fix the problems some people have been having
> with KConfig and friends. Let me + Jim know if that is the case.
> Phil: Does this problem affect PyQt4? I don't know if they use
> dynamic_cast much.
Qt doesn't use dynamic_cast at all.
> For those who are interested in the gory details, the problem is
> described here:
> A dynamic_cast was failing in Oxygen in the menu drawing code, and a
> default value was being used instead (an empty string). The thing is
> that Python dlopens()s kdeui instead of just being linked to it like a
> normal C++ program. This breaks dynamic_cast between kdeui.so and
> oxygen.so. I've tested this out with test code here, and the problem
> fits this analysis exactly.
> A workaround in Python:
More information about the PyQt