[Qt-jambi-interest] Attaching menu bars to widgets
Eskil Abrahamsen Blomfeldt
eblomfel at trolltech.com
Tue Apr 15 10:39:18 CEST 2008
Gregor Mückl wrote:
> 1. Can this be done with Qt Jambi at all without implementing an own menu bar?
>
Yes.
> 2. If so, could you roughly sketch how this would work?
>
I've attached a brief example to this mail. Since any widget in Qt Jambi
can be a child widget, there are different ways of doing this. One is
putting your 3D view inside a QMainWindow and adding this to your layout
(even though it's called 'window' there's no reason it can't be embedded
inside another widget/main window/etc.) Then you will get a child widget
with all the capabilities of the main window, including menubars, dock
widgets, statusbars and toolbars. Another way is to instantiate the
widget QMenuBar directly and adding this to your layout, in which case
you will have more control over how it looks.
In the example I have a top level widget with three children: a plain
button, a main window and a menu bar. The main window has a central
widget which is another button just to illustrate the nesting. Hopefully
this is somewhere in the region of what you were after?
-- Eskil
-------------- next part --------------
A non-text attachment was scrubbed...
Name: MenuBarInWidget.java
Type: text/java
Size: 1001 bytes
Desc: not available
Url : http://lists.trolltech.com/pipermail/qt-jambi-interest/attachments/20080415/dd93dfed/attachment.bin
More information about the Qt-jambi-interest
mailing list