[PyKDE] KDE XML GUI ActionLists

Jim Bublitz jbublitz at nwinternet.com
Wed Apr 23 19:36:01 BST 2003

On 23-Apr-03 Gordon Tyler wrote:
> Jim Bublitz wrote:
>> Change your KMainWindow to KParts.MainWindow and be sure to do
>> this:
> Odd. So the ActionList merging depends on the KParts
> infrastructure. Very odd.
> Hmm... I think this fixes it as a side effect. I just searched
> the kde-devel mailing list archives (Why didn't I do this
> before? Your guess is as good as mine), and found the following
> thread:
> http://lists.kde.org/?l=kde-devel&m=101465392909963&w=2
> My createGUI call uses the default value for the second
> parameter, conserveMemory = true, so the DOM is thrown away
> afterwards which stops plugActionList from working. Specifying
> false should make plugActionList work while still inheriting
> from KMainWindow.

KDE <-> conserveMemory seems somewhat oxymoronic :)

> The KParts.MainWindow createGUI method probably passes false to
> the real createGUI method which is why it seems to fix the
> problem.

Yep - setting the second arg to 0 fixes it too (just tried it). 
Your explanation is probably correct, but I'm not going to trace the
code to find out. I haven't found an example in C++ code that does
this, but like I said, most of the stuff I looked at ends up using
KParts too.
> I'm such a dumbass, sorry for wasting your time with this.

It's fairly non-obvious in my opinion. Since I finally have PyKDE
code generation on fairly firm footing*, my goals for the project
are now to:

1. Get thorough testing in place

2. Get a lot more support stuff in place - which means improving
docs, writing example code, templates, etc.

Going through this exercise allowed me to work on both of those and
you actually came up with the correct answer, so I'm not
disappointed in this at all. And since you provided the tutorial
link and a code sample, I really only spent a few hours on this,
and I now have working demo/test code. I'm not that great a KDE
expert, so any help is appreciated.


*it's likely Phil will make sip changes that undermine this,
however :)

More information about the PyQt mailing list