KPart GUI merging

Caleb Tennis caleb at aei-tech.com
Mon Mar 31 15:16:08 BST 2003


Andras,

While I'm interesting in hearing more about this topic from some of the KPart 
gurus, I actually recently implemented a workaround for something similar to 
this in KDevelop that I thought you might be interested in.

I needed a way to redirect the help_report_bug action from the standard rc 
file. This is what I did:

setXMLFile("gideonui.rc");
createGUI(0);

// New code:

KAction *a = actionCollection()->action("help_report_bug");
disconnect(a, SIGNAL(activated()), 0 ,0);
connect(a, SIGNAL(activated()), this, SLOT(slotReportBug()));

// End new code

This allowed me to use what I knew was in the standard ui file but to redirect 
its actions to my own slots.  I tried many different implementations of 
merging with the gideonui.rc file, but this was the only way I could get it 
to work.

Caleb




More information about the kde-core-devel mailing list