summaryrefslogtreecommitdiffstats
path: root/qtsharp/src/examples/tutorials/t1.cs
blob: 84c79d38eb3e8911653186c4068eddf1b219d1a5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
// Qt# tutorial 1
// Based on the Qt tutorial
// Implemented by Marcus Urban

using System;
using Qt;

public class Example {

	public static int Main (String[] args)
	{
		TQApplication a = new TQApplication (args);
		
		TQPushButton hello = new TQPushButton ("Hello world!", null);
		// In C++, the second parameter is 0 (null pointer)
		
		hello.Resize (100, 30);
		
		a.SetMainWidget (hello);
		hello.Show ();
		return a.Exec ();
	}
}