Exemplo n.º 1
0
 public void InitUI()
 {
     QPushButton quit = new QPushButton ("Quit", this);
     //Connect (quit, SIGNAL("clicked()"), qApp, SLOT("quit()"));
     quit.Clicked += OnQuitButtonClicked;
     quit.SetGeometry (50, 40, 80, 30);
 }
Exemplo n.º 2
0
 private void InitUI()
 {
     QPushButton button = new QPushButton ("Quit", this);
     button.SetGeometry (50, 40, 80, 20);
     button.Clicked += (obj) => {
         QApplication.Quit();
     };
 }
Exemplo n.º 3
0
        private void InitUI()
        {
            QPushButton button = new QPushButton("Quit", this);

            button.SetGeometry(50, 40, 80, 20);
            button.Clicked += (obj) => {
                QApplication.Quit();
            };
        }
Exemplo n.º 4
0
    public MyWidget(QWidget parent) : base(parent)
    {
        SetFixedSize(200, 120);

        QPushButton quit = new QPushButton(Tr("Quit"), this);

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

        Connect(quit, SIGNAL("clicked()"), qApp, SLOT("quit()"));
    }
Exemplo n.º 5
0
    public static int Main(String[] args)
    {
        QApplication app = new QApplication(args);

        QWidget window = new QWidget();

        window.Resize(200, 120);

        QPushButton quit = new QPushButton("Quit", window);

        quit.Font = new QFont("Times", 18, (int)QFont.Weight.Bold);
        quit.SetGeometry(10, 40, 180, 40);

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

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