next up previous
Next: Listing of 'HelloQtOnNetBeans.h' Up: The Qt C++ Test Program Previous: The Qt C++ Test Program

Listing of 'HelloQtOnNetBeans.cc'

// 
// File:   HelloQtOnNetBeans.cc
// Author: Horst Rogalla
//
// Created on December 24, 2006, 2:05 PM
//

#include "HelloQtOnNetBeans.h"


MyWidget::MyWidget(QWidget *parent) : QWidget(parent)
{
  setFixedSize(250,130);

  QLabel *hello = new QLabel(this);
  hello->setText("Hello World - Hello Qt !\nHello NetBeans !");
  hello->setAlignment(Qt::AlignHCenter | Qt::AlignVCenter);
  hello->setGeometry(50,25,150,30);

  QPushButton *quit = new QPushButton("Quit",this);
  quit->setGeometry(85,80,80,20);

  connect(quit,SIGNAL(clicked()),qApp,SLOT(quit()));

}

int main(int argc, char** argv) {
  QApplication a(argc,argv);

  MyWidget w;
  w.show();

  return a.exec();
}



next up previous
Next: Listing of 'HelloQtOnNetBeans.h' Up: The Qt C++ Test Programn Previous: The Qt C++ Test Program

TSSE, 23 October 2008