blob: be807ea08518f4ae0a3a95cdb0c69ab3608bfb3d (
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, 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 ();
}
}
|