Problem 1604 - [Qt5] Can not open OpenGL layout from input UI
Summary: [Qt5] Can not open OpenGL layout from input UI
Status: RESOLVED FIXED
Alias: None
Product: Geant4
Classification: Unclassified
Component: interface/basic (show other problems)
Version: 10.0
Hardware: All Mac OS X
: P5 normal
Assignee: garnier
URL:
Depends on:
Blocks:
 
Reported: 2014-04-08 16:31 CEST by Jérôme Suhard
Modified: 2014-07-10 10:37 CEST (History)
2 users (show)

See Also:


Attachments
flickering widget in Qt5 UI (103.30 KB, image/tiff)
2014-04-08 16:31 CEST, Jérôme Suhard
Details

Note You need to log in before you can comment on or make changes to this problem.
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);