PDA

View Full Version : A close button in QMenuBar



edgard26
4th June 2009, 16:17
Hi all,
I would want to add a close document button on the right side of a QMenuBar, like in many MDI application.
Is it possible?
If it is, how can I do this?

Thanks in advance.

Matteo.

Ginsengelf
5th June 2009, 08:06
Hi, then why don't you create an MDI application? -> see QMdiArea and friends.

Ginsengelf

edgard26
5th June 2009, 09:38
I have done it, but in the QMenuBar section there is no close button.
I used a TabbedView mode for the MDI, and if I want close a document I have to click the right mouse button and choose the close action on the pop-up menu.

Ginsengelf
5th June 2009, 10:43
I'm afraid I don't know what you mean by "TabbedView mode" :crying:
Normally you get the close button if you maximize a window, otherwise each child window has its own title bar.

Ginsengelf

edit: Ah, my Qt is too old... now I see the "TabbedView" mode, so forget about this post.