[Kde-bindings] Help start with MonoDevelop and Qyoto GUI

IBBoard ibboard at gmail.com
Wed Feb 10 19:39:13 UTC 2010

What I do, to take advantage of delegate methods, is the following:

QObject.Connect(layout.actionCreateArmy, SIGNAL("triggered()"),

where "layout" is my "UI_...." class. "actionCreateArmy" is a menu item
that I've also added to the toolbar (which I do programmatically as I
haven't found another way to do it). "CreateNewArmy" is then a
zero-argument method that doesn't return anything.

(Full form at

Hope that helps.

On 09/02/10 12:47, linuxoidoz at yahoo.com.au wrote:
> I got most of the buttons and other input widgets working but still struggling with menus and toolbars.
> Can you please show me how to create a signal in my new class to perform an action on pressing a menu item or a toolbar button? Thank you.
> ------------------  Original Message  ------------------
> Subject: Re: [Kde-bindings] Help start with MonoDevelop and Qyoto GUI
> Date: Mon, 8 Feb 2010
> From: Arno Rehn <arno at arnorehn.de>
> To: KDE bindings for other programming languages <kde-bindings at kde.org>
>> On Monday 08 February 2010 13:49:02 linuxoid.au at gmail.com wrote:
>>> I've finally converted a gui .ui file made in Qt Designer into .cs file
>>> with uics.
>>> Now I can open the dialog. Can you please tell me how to tie properties to
>>> the widgets? For example, the new gui.cs file has this:
>>> [snip]
>>> Now, what should I do in the MainWindow.cs to display a message box, for
>>> example, when the OK button is clicked?
>> Most commonly it's done like this with Qt:
>> class MyDialog : QDialog {
>> 	Ui.Dialog ui = new Ui.Dialog();
>> 	public MyDialog() {
>> 		ui.SetupUi(this);
>> 		Connect(ui.myFancyButton, SIGNAL("clicked()"), delegate {
>> 			// your code here
>> 		});
>> 		Connect(ui, SIGNAL("rejected()"), qApp, SLOT("quit()"));
>> 	}
>> }
>> So your custom Dialog class owns the user interface and doesn't inherit from 
>> it.
> _______________________________________________
> Kde-bindings mailing list
> Kde-bindings at kde.org
> https://mail.kde.org/mailman/listinfo/kde-bindings

More information about the Kde-bindings mailing list