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 > /lib/python2.5/site-packages/PyKDE4/__init__.py). > > import sys, dl > sys.setdlopenflags(dl.RTLD_NOW|dl.RTLD_GLOBAL) > > 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: > > http://gcc.gnu.org/faq.html#dso > > 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: > > http://mail.python.org/pipermail/c++-sig/2005-April/008829.html Phil _______________________________________________ PyQt mailing list [email protected] http://www.riverbankcomputing.com/mailman/listinfo/pyqt
