// Demo of a TTQString slot // Implemented by Marcus Urban using System; using Qt; public class MyWidget : TQVBox { TTQLineEdit lineEdit; TTQLabel label; public MyWidget (TTQWidget parent, String name) : base (parent, name) { lineEdit = new TTQLineEdit( this, "lineEdit" ); label = new TTQLabel( this, "label" ); label.SetText("Default"); TTQObject.Connect( lineEdit, TQT_SIGNAL("textChanged(TTQString)"), label, "SetText(TTQString)" ); } public MyWidget (TTQWidget parent) : this (parent, "") {} public MyWidget () : this (null, "") {} } public class Example { public static int Main (String[] args) { TTQApplication a = new TTQApplication (args); MyWidget w = new MyWidget (); a.SetMainWidget (w); w.Show (); return a.Exec (); } }