//=============================================== // method //=============================================== public unsafe void run(string[] args) { sGApp lApp = GManager.Instance().getData().app; int argc = 0; lApp.app = new QApplication(ref argc, null); QLabel lLabel = new QLabel(); lLabel.Text = "Bonjour tout le monde"; lLabel.Alignment = AlignmentFlag.AlignCenter; QVBoxLayout lMainLayout = new QVBoxLayout(); lMainLayout.AddWidget(lLabel); QWidget lWindow = new QWidget(); lWindow.Layout = lMainLayout; lWindow.Resize(lApp.win_width, lApp.win_height); lWindow.WindowTitle = lApp.app_name; lWindow.Show(); QApplication.Exec(); }
public static void Main() { // Create a new QApplication object QApp = QApp.CreateQApp(); // Create a basic widget var widg1 = new QWidget(); widg1.Resize(250, 150); widg1.WindowTitle = "Simple example"; widg1.Show(); QApplication.Exec(); }
public static void Main() { // Create a new QApplication object QApp = QApp.CreateQApp(); // Create a basic widget var widg1 = new QWidget(); widg1.Resize(250, 150); widg1.WindowTitle = "Simple example"; widg1.Show(); QApplication.Exec(); }
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()); }