[Kommander-devel] Re: Accessing a QAction in a Kommander Plugin
Kevin Krammer
kevin.krammer at gmx.at
Thu Feb 21 04:05:28 EST 2008
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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part.
Url : http://mail01.fortunecookiestudios.com/pipermail/kommander-devel/attachments/20080221/db02de6e/attachment.pgp
More information about the Kommander-devel
mailing list