GSI Object Oriented Online Offline (Go4) GO4-6.4.0
Loading...
Searching...
No Matches
ExampleMain.cpp
Go to the documentation of this file.
1// $Id$
2//-----------------------------------------------------------------------
3// The GSI Online Offline Object Oriented (Go4) Project
4// Experiment Data Processing at EE department, GSI
5//-----------------------------------------------------------------------
6// Copyright (C) 2000- GSI Helmholtzzentrum fuer Schwerionenforschung GmbH
7// Planckstr. 1, 64291 Darmstadt, Germany
8// Contact: http://go4.gsi.de
9//-----------------------------------------------------------------------
10// This software can be used under the license agreements as stated
11// in Go4License.txt file which is part of the distribution.
12//-----------------------------------------------------------------------
13
14#include "TApplication.h"
15
16#include "QRootApplication.h"
17
18#include "ExampleWidget.h"
19
20int main(int argc, char **argv)
21{
22
23 argc = 1; // hide all additional parameters from ROOT and Qt
24 TApplication app("uno", &argc, argv); // ROOT application
25
26 cha r argv2[2];
27 argv2[0] = argv[0];
28 argv2[argc] = 0;
29
30 QRootApplication myapp(argc, argv2); // Qt application
31
32 // create instance, which should be used everywhere
33 ExampleWidget* widget = new ExampleWidget();
34
35 QObject::connect(&myapp, &QRootApplication::lastWindowClosed, &myapp, &QRootApplication::quit);
36
37 widget->show();
38
39 int res = myapp.exec();
40 return res;
41}
int main(int argc, char **argv)