[Kde-bindings] Qyoto, C# - how to get to menu actions from another class?

IBBoard ibboard at gmail.com
Thu Feb 25 19:29:58 UTC 2010


On 25/02/10 09:45, linuxoidoz at yahoo.com.au wrote:
> Hello,
> 
> If I have menu and toolbar actions set up in my MainWindow class, can you please tell me how I can get to and control them from another class?
> ...
> The 'win' will only give me access to the MainWindow widgets, but it can't see the actions. I tried to make WindowUI to inherit from the MainWindow and to use 'base.actionAbout', then the actions are available but I can't control them, that is I can write the code, it compiles without errors but it doesn't do anything, for example 'base.actionAbout.SetDisabled(true);' doesn't do anything. Nor does the actionAbout signal/slot do anything when I click on it (which should open an About message box).
> 
> Thank you.
> _______________________________________________
> Kde-bindings mailing list
> Kde-bindings at kde.org
> https://mail.kde.org/mailman/listinfo/kde-bindings

This is probably the same as your previous issue with the tabs/stacked
widget and the status bar: either a) you don't because the widget
purposefully *shouldn't* have access to 'internal' parts of the dialog
and so you find another way to do it or b) you pass the menu action
object into the widget (e.g. via a setter method).



More information about the Kde-bindings mailing list