public static void Main(string[] args) { int argc = args.Length; using (QApplication app = new QApplication (ref argc, args, 0x040602)) { QPushButton hello = new QPushButton (QString.FromUtf8 ("Hello", 5), null); hello.Resize (100, 30); hello.Show (); CppLibrary.SaveInteropAssembly (); QApplication.Exec (); } /* using (QPushButton hello = new QPushButton ("Hello world!"), hello2 = new QPushButton ("Another button")) { hello.Resize (100, 30); hello2.Resize (200, 30); //CppLibrary.SaveInteropAssembly (); hello.Visible = true; hello2.Visible = true; app.Exec (); } } */ }
public static void Main (string[] args) { using (QApplication app = new QApplication ()) { using (QPushButton hello = new QPushButton ("Hello world!")) { hello.Resize (200, 30); QObject.Connect (hello, "2clicked()", app, "1aboutQt()", ConnectionType.AutoConnection); hello.SetVisible (true); QApplication.Exec (); } } }
public static void Main(string[] args) { using (QApplication app = new QApplication ()) { using (QPushButton hello = new QPushButton ("Hello world!"), hello2 = new QPushButton ("Another button")) { hello.Resize (100, 30); hello2.Resize (200, 30); //CppLibrary.SaveInteropAssembly (); hello.Visible = true; hello2.Visible = true; app.Exec (); } } }