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

List:       kde-devel
Subject:    Re: Accessing a QAction in a Kommander Plugin
From:       Kevin Krammer <kevin.krammer () gmx ! at>
Date:       2008-02-21 9:05:28
Message-ID: 200802211005.37002.kevin.krammer () gmx ! at
[Download RAW message or body]

[Attachment #2 (multipart/signed)]


Hi Eric,

On Thursday 21 February 2008, Eric Laffoon wrote:

> The problem is I have to take in a QString with the name of that action and
> then call it. For openers, I'm not sure but I think the Actions are named
> with QCString. I could be wrong. Regardless I'm having a bear of a time
> figuring out the basic syntax and I don't have time to study this in depth.
> I have the Action name as declared in the editor, so it's in the ui/kmdr
> file. Can someone give me the syntax for a simple working function
> prototype here and the required include files?

If the problem is finding the QAction pointer, you can use the child() method 
the main window inherits from QObject.

This returns a QObject* and if you just have to change a property 
like "enabled" you can do it right there through the setProperty() method.

Otherwise you have to cast to QAction*

Cheers,
Kevin

-- 
Kevin Krammer, KDE developer, xdg-utils developer
KDE user support, developer mentoring

["signature.asc" (application/pgp-signature)]

>> 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