Ejemplo n.º 1
0
    public static int Main(String[] args)
    {
        QApplication app   = new QApplication(args);
        QPushButton  hello = new QPushButton("Hello world!");
        QLabel       label = new QLabel(hello);

        hello.Resize(100, 30);
        hello.Show();
        return(QApplication.Exec());
    }
Ejemplo n.º 2
0
        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();
                }
            }
        }
Ejemplo n.º 3
0
    public static int Main(String[] args)
    {
        QApplication app = new QApplication(args);

        QPushButton quit = new QPushButton("Quit");

        quit.Resize(75, 30);
        quit.Font = new QFont("Times", 18, (int)QFont.Weight.Bold);

        QObject.Connect(quit, SIGNAL("clicked()"), app, SLOT("quit()"));

        quit.Show();
        return(QApplication.Exec());
    }