blob: c0559f5b3bee8430dd83a80b7f4bfe0458b24e86 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
|
// 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, TQT_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 ();
}
}
|