35#include <qapplication.h>
41#ifdef G4VIS_USE_VTK_QT
42# include "QVTKOpenGLNativeWidget.h"
43# include <qsurfaceformat.h>
46G4Qt* G4Qt::instance =
nullptr;
48static G4bool QtInited =
false;
62 if (instance ==
nullptr) {
63 instance =
new G4Qt(a_argn, a_args, a_class);
68G4Qt::G4Qt(
int a_argn,
char** a_args,
char*
101 args = (
char**)malloc(1 *
sizeof(
char*));
102 args[0] = (
char*)malloc(10 *
sizeof(
char));
103 strncpy(args[0],
"my_app \0", 9);
106 int* p_argn = (
int*)malloc(
sizeof(
int));
109 qApp->setAttribute(Qt::AA_UseDesktopOpenGL);
112#ifdef G4VIS_USE_VTK_QT
113 QSurfaceFormat::setDefaultFormat(QVTKOpenGLNativeWidget::defaultFormat());
115 new QApplication(*p_argn, args);
148 setlocale(LC_NUMERIC,
"C");
155 if (
this == instance) {
179 qApp->processEvents();
G4GLOB_DLL std::ostream G4cout
static G4Qt * getInstance()
void * GetEvent() override
void FlushAndWaitExecution() override
G4int GetVerboseLevel() const
static G4UImanager * GetUIpointer()
void SetMainInteractor(G4Interactor)
void SetArguments(int, char **)