[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-devel
Subject:    Re: KActions in context menus
From:       Olaf Hartig <OleBowle () gmx ! de>
Date:       2001-11-07 19:22:34
[Download RAW message or body]

On Wednesday 07 November 2001 19:07, Alexander Brand wrote:
> The main problem is this: I have a KPart. In this I can now set a factory
> (with your solution). Ok, but this part has a main widget with two other
> widgets. One of them is a ListView. In this object I didn't have a factory.

Hello Alexander,

I had the same problem and solved it the following way:

Add a member of the type KXMLGUIClient* to your widget (the listview) and 
initialize it in its constructor. By initializing you widget (which surely 
happens in your part's constructor) you hand over a pointer to your part 
(which is of the same type, because KParts::PartBase is derived from 
KXMLGUIClient).
In your widgets functions you can use the new pointer.

You may take a look at KXMLEditor (http://kxmleditor.sourceforge.net) to see 
the details.

Bye,
Ole
-- 
In a world without walls and fences,
who needs Windows and Gates?
 
>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic