From kde-devel Wed Nov 07 15:39:46 2001 From: Kurt Granroth Date: Wed, 07 Nov 2001 15:39:46 +0000 To: kde-devel Subject: Re: KActions in context menus X-MARC-Message: https://marc.info/?l=kde-devel&m=100514765211718 On Wednesday 07 November 2001 12:52 am, Olaf Hartig wrote: > On Tuesday 06 November 2001 23:08, Alexander Brand wrote: > > I try to implement this in a KPart. But I didn't get any 'factory()'. The > > only factory (Type: KXMLGUIClient) I found was in KPart::MainWindow. > > But how can I implement it? Please, can somebody help? > > Since KParts::PartBase is derived from KXMLGUIClient and your kpart is > surely derived from one of KParts::PartBase child classes you can simply > use KXMLGUIClient::factory() in your part's member functions. Right, but that's not what he was asking (I think). While the part does have access to the KXMLGUIClient::factory() method, it will no good if the part doesn't have a KMainWindow-derived parent since that is where the setFactory is done. If you expect to use a part outside of the normal MainWindow constraints, then you must define the factory yourself. -- Kurt Granroth | http://www.granroth.org KDE Developer/Evangelist | SuSE Labs Open Source Developer granroth@kde.org | granroth@suse.com KDE -- Conquer Your Desktop >> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<