You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
39 lines
764 B
39 lines
764 B
// Demo of a TQString slot
|
|
// Implemented by Marcus Urban
|
|
|
|
using System;
|
|
using Qt;
|
|
|
|
public class MyWidget : TQVBox
|
|
{
|
|
TQLineEdit lineEdit;
|
|
TQLabel label;
|
|
|
|
public MyWidget (TQWidget parent, String name) : base (parent, name)
|
|
{
|
|
lineEdit = new TQLineEdit( this, "lineEdit" );
|
|
label = new TQLabel( this, "label" );
|
|
label.SetText("Default");
|
|
|
|
TQObject.Connect( lineEdit, TQ_SIGNAL("textChanged(TQString)"),
|
|
label, "SetText(TQString)" );
|
|
}
|
|
|
|
|
|
public MyWidget (TQWidget parent) : this (parent, "") {}
|
|
public MyWidget () : this (null, "") {}
|
|
}
|
|
|
|
public class Example {
|
|
|
|
public static int Main (String[] args)
|
|
{
|
|
TQApplication a = new TQApplication (args);
|
|
|
|
MyWidget w = new MyWidget ();
|
|
a.SetMainWidget (w);
|
|
w.Show ();
|
|
return a.Exec ();
|
|
}
|
|
}
|