Message: Re: Add QT-4.8.5 in the GEANT4 installation Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

None Re: Add QT-4.8.5 in the GEANT4 installation 

Forum: Installation and Configuration
Re: Question Add QT-4.8.5 in the GEANT4 installation (Annie Meneses)
Date: 27 Apr, 2016
From: Alexey Solovyev <Alexey Solovyev>

I can tell you my experience with Geant4 with Qt on windows.

1. You ARE to build qt. I failed many times trying to use Qt installed from binaries. So you need to download Qt sources. It should be smth like *everywhere*.zip, e.g. or

2. Unpack it, run proper Visual Studio command prompt. Depending on VS version it can be in different menu. For VS2015 you may need to install them separately with VS installer (by checking Developer tools). Go to unpacked folder and run configure.bat/configure.exe (bat for 4.8.*, .exe for 5.6.*) with proper commands, you can check configure --help before and don't forget to use --prefix. Than run nmake and nmake install.

2a. Depending on VS version and QT version you must use different "-platform" option. One thing is that 4.8.5 build tool doesn't support vs higher than 2010. So if this qt version is mandatory for you, you should stick with VS2010, but you won't be able to build Geant4.10.2+ as soon as it use some options which are not supported by this version. So you'd better use qt 4.8.7 version.

2b. One more thing. VS2015 is also not supported by qt4 build system directly. Follow instructions on

3. After that you are running cmake and go build Geant4 as usual. But I suggest you to free your %PATH% variable before, than check GEANT4_USE_QT option (if you are using cmake-gui) and manually enter the path to qmake located in qt install dir. Other libs should be found automatically after clicking Configure two times.

3a. For some reason qt5 ignored by default by geant4 cmake rules on windows. Still you can use qt5 by adding line like ` set (CMAKE_PREFIX_PATH "D:\\Temp\\qt560_msvc2015\\install\\")` to geant4_source_dir\cmake\Modules\Geant4InterfaceOptions.cmake before the line if(NOT GEANT4_FORCE_QT4) (for 10.2.p01 it's the 88 line). Also you may need some changes in cmake/share/cmake-x.x/Modules/FindQT4.cmake or temporary delete it (I did it for some other reasons but not sure if this is really needed, only while using Qt5 though).

Still qt on windows may fail to represent complex geometries, e.g. it builds empty screen with ORNL phantom from examples/advanced/human_phantom, and with x64 (note that both Geant4 and qt must be build as x64) there are some issues with using G4VisExecutive (you may fail to run several default examples when putting e.g. vis.mac as an command line parameter, but it will properly run without any params).

 Add Message Add Message
to: "Re: Add QT-4.8.5 in the GEANT4 installation"

 Subscribe Subscribe

This site runs SLAC HyperNews version 1.11-slac-98, derived from the original HyperNews

[ Geant 4 Home | Geant 4 HyperNews | Search | Request New Forum | Feedback ]