Problem 1604

Summary: [Qt5] Can not open OpenGL layout from input UI
Product: Geant4 Reporter: Jérôme Suhard <jerome>
Component: interface/basicAssignee: garnier
Status: RESOLVED FIXED    
Severity: normal CC: garnier, jerome
Priority: P5    
Version: 10.0   
Hardware: All   
OS: Mac OS X   
Attachments: flickering widget in Qt5 UI

Description Jérôme Suhard 2014-04-08 16:31:21 CEST
Created attachment 261 [details]
flickering widget in Qt5 UI

Steps to reproduce:

Install Geant4 with Qt5 and not Qt4

$ mkdir build && cd build
$ cmake -DGeant4_DIR=/path/to/Geant4.10.0.p01/install/lib/Geant4-10.0.1 /path/to/source/geant4.10.00.p01/examples/extended/geometry/transforms/
$ make
$ ./transforms 

=> G4UIQt opens, reads vis.mac and shows OpenGLStoredQt layout with the volume in it. All is functional.

$ rm vis.mac
$ ./transforms

=> G4UIQt opens, write "/vis/open OGL" in the input called "Session:" and validate : the interface freezes, an empty flickering widget appears in front of the main view (cf screenshot attachment) and you can not type any more command in the input. You can obtain the same result if you write "/control/execute vis.mac" in the input.

For the record, Qt 4.8 works fine with the same steps.

System informations:
OS X 10.9.2
clang 500.2.79
Qt 5.2.1
Geant4 10.0.1 MT
Comment 1 garnier 2014-07-10 10:37:01 CEST
Fixed

The fix is : 

bool G4UIQt::AddTabWidget(

You should have a :
    fViewerTabWidget = new G4QTabWidget(fViewerTabHandleWidget, sizeX, sizeY);

replace it by :
    fViewerTabWidget = new G4QTabWidget(NULL, sizeX, sizeY);