[Gate-users] Bugfix to the Qt5 problem

Anders Garpebring anders.garpebring at umu.se
Wed Sep 23 10:03:30 CEST 2015


Dear gate developers,

I had problem earlier with a segmentation fault if I run Gate in Qt mode. For instance if I do the command: "Gate -qt main.mac". It turned out to be a change in Qt at some version that introduced this problem. The fix to the problem is quite simple. In the a Gate.cc file include the libraries:

#include <G4UIQt.hh>
#include <qmainwindow.h>

And around line 335 insert the bold text

#ifdef G4UI_USE
      ui = new G4UIExecutive( argc, argv );

      G4UIQt* qui = static_cast<G4UIQt*> (UImanager->GetG4UIWindow());
      if (qui) {
        qui->GetMainWindow()->setVisible(true);
      }

#else

Perhaps something to include in the next release.

Kind regards,
Anders Garpebring
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opengatecollaboration.org/mailman/private/gate-users/attachments/20150923/a1c9319b/attachment.html>


More information about the Gate-users mailing list