示例#1
0
文件: hello.cs 项目: shana/cppinterop
        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 ();

                }
            }
                        */
        }
示例#2
0
文件: hello.cs 项目: ctguxp/cxxi
		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 ();
				}
			}
		}
示例#3
0
文件: Main.cs 项目: shana/cppinterop
        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 ();

                                }
                        }
        }