Problem 1391 - Geant4.9.6b01: File menu is behind user menus in Qt session
Summary: Geant4.9.6b01: File menu is behind user menus in Qt session
Status: RESOLVED FIXED
Alias: None
Product: Geant4
Classification: Unclassified
Component: interfaces (show other problems)
Version: other
Hardware: All All
: P5 trivial
Assignee: garnier
URL:
Depends on:
Blocks:
 
Reported: 2012-11-15 10:34 CET by Alexey
Modified: 2014-05-09 15:10 CEST (History)
1 user (show)

See Also:


Attachments
Wrong File menu position (7.22 KB, image/png)
2012-11-15 10:34 CET, Alexey
Details

Note You need to log in before you can comment on or make changes to this problem.
Description Alexey 2012-11-15 10:34:43 CET
Created attachment 192 [details]
Wrong File menu position

If in a qt session i use /gui/addMenu command then menu File is always at the last position (see attached image): this happens for all examples shipped with Geant4 sources that support Qt UI.

What's wrong:

G4UIQt::AddMenu() use

fMainWindow->menuBar()->insertMenu(fMainWindow->menuBar()->actions().last(),fileMenu);

This will always insert new menu items just before the last one (normally File), not behind the last item!

Solution:

Use

fMainWindow->menuBar()->addMenu(fileMenu);

instead. This fixes the issue.

Cheers, Alexey.
Comment 1 garnier 2014-05-09 15:10:43 CEST
Fixed in Geant4.9.6