[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-java
Subject: Re: [Kde-java] Using KActions (almost working...)
From: Richard Dale <Richard_Dale () tipitina ! demon ! co ! uk>
Date: 2002-05-15 9:48:36
[Download RAW message or body]
Hi George
Can you post the complete program, or give a URL where I can get it so I can
try it out. Does the factory() method return null - is that the problem?
-- Richard
On Wednesday 15 May 2002 12:14 am, George Russell wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Ok, could those on the list look over the following code snippet, and
> tell me if I'm completely up the wrong tree?
>
> I can't get a Popup menu from the XML description.
>
> The main menubar works fine with its inserted menu.
>
> Thanks
> George
>
> // creating the Kactions used in menu
> new KAction("Gutenberg &Website", new KShortcut(0) , this,
> SLOT("showPGWebSite()"),
> actionCollection(), "Web Site");
> new KAction("&Broken Link", new KShortcut(0) , this,
> SLOT("reportBrokenLink()"),
> actionCollection(), "Broken Link");
>
> // In the class inheriting from KMainWindow ....
> // CreateGUI has been called.
> menu = (QPopupMenu) (factory().container("Other",this));
> if (menu == null)
> System.out.println("null from factory");
>
> // The XML UI File
> <!DOCTYPE kpartgui>
> <kpartgui name="gilt">
> <MenuBar>
> <Menu name="Other"><text>&Other</text>
> <Action name="Web Site"/>
> <Action name="Broken Link"/>
> </Menu>
> </MenuBar>
> </kpartgui>
>
> // Docs used
> http://developer.kde.org/documentation/kde3arch/xmlgui.html
> - --
> 11:04pm up 20 days, 1:03, 2 users, load average: 0.14, 0.14, 0.15
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.0.6 (GNU/Linux)
> Comment: For info see http://www.gnupg.org
>
> iD8DBQE84ZpxmKQ22J87hwMRAuUwAKC0KJU8a7ghKu8+9+UMUJ4HkUhRtACggR1v
> hvMJ6k6IgQCdVOvv3wAeg+M=
> =mtng
> -----END PGP SIGNATURE-----
>
> _______________________________________________
> Kde-java mailing list
> Kde-java@mail.kde.org
> http://mail.kde.org/mailman/listinfo/kde-java
_______________________________________________
Kde-java mailing list
Kde-java@mail.kde.org
http://mail.kde.org/mailman/listinfo/kde-java
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic