On 08.03.12 01:48:32, Rui Maciel wrote:
> I've developed a small application whose UI basically consists of a 
> QMainWindow with a QMdiArea, which includes a set of QMdiSubWindow 
> widgets.  A couple of QMdiSubWindow also include QMainWindow objects of 
> their own, in order to provide a QMenu that's specific for each MDI 
> subwindow type.
> 
> This has worked well, and I never noticed any problem.  Yet, after 
> testing the application under Ubuntu 11.10, and running it on Unity, 
> I've noticed that there is a serious problem with the way the 
> application's menu is presented.  More precisely, the only menu bar 
> which is made available is the one which is created by a MDI window with 
> a QMainWindow menu, while the application's menu is nowhere to be seen.
> 
> Adding to this problem, the MDI window's menu bar is configured to be 
> hidden from site, but that doesn't appear to work under Unity.
> 
> So, has anyone experienced anything like this?  Is this some problem 
> plaguing Unity or is my application doing something that it really 
> shouldn't be doing?

Similar problems can be seen with older Eclipse versions and other apps,
Unity is simply a half-assed try at doing this by patching the hell out
of the GUI toolkit libraries (like Qt and GTK). There's an environment
variable that one can set to disable this behaviour: UBUNTU_MENUPROXY=1

So it is a problem unique to the Unity desktop. That being said you
could've just added your QMenu to a standard layout instead of re-using
QMainWindow in the QMdiSubWindows, its a QWidget after all and hence can
be used in normal layouts.

Andreas

_______________________________________________
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest

Reply via email to