Geant4 Without built in UI

Hello I have project based on Qt 5 and Geant4 I already created my Application Main Window
in Qt independent from Geant4, I just wanna use Geant4 Terminal and put it to my MainWindow’s some widget, I already tried to adopting G4UImanager, G4UIExecutive, G4UIsession to QWidget and adding them to my MainWindow’s some widget, but it doesnt help. OpenGLStroedX still popping in another window.
I am new in Geant4 please help.

Not sure I understand. You don’t have to build Geant4 with Qt or OpenGL, and even if you have, you don’t have to use them.

Yes you didnt undersand, :slight_smile: I have an GDML Viewer App and I want to use geant4 for visualization but not for the user interface I just need to fix the opengl viewer to my Qt App’s main window.

Still not sure I understand.

If you wish to visualise a GDML file in Geant4 you could use examples/extended/persistency/gdml/G01.

If you don’t want the Qt GUI, see How to select interface in your applications.

I wish to use OGLSQt but it doesnt work without G4UIQt, I dnt wanna use G4UIQt

You don’t have to use G4UIQt (see How to Set Up an Interactive Session — Book For Application Developers 10.7 documentation), but I’m afraid you cannot use OGLSQt without it.

You will have to build Geant4 with one of the other graphics drivers - OGLSX (using CMake option -DGEANT4_USE_OPENGL_X11=ON) or OGLSXm if you have Motif (additionally -DGEANT4_USE_XM=ON) or OI if you have the Open Inventor libraries (but they are tricky to install and CMake needs special instructions). OGLSX opens a non-interactive window, but you can change viewpoint and zoom, etc., with Geant4 commands, e.g., /vis/viewer/zoom.