Results 1 to 4 of 4

Thread: A close button in QMenuBar

  1. #1
    Join Date
    Apr 2009
    Posts
    2
    Platforms
    Unix/X11 Windows

    Default A close button in QMenuBar

    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.

  2. #2
    Join Date
    Jul 2008
    Location
    Germany
    Posts
    509
    Thanks
    11
    Thanked 76 Times in 74 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: A close button in QMenuBar

    Hi, then why don't you create an MDI application? -> see QMdiArea and friends.

    Ginsengelf

  3. #3
    Join Date
    Apr 2009
    Posts
    2
    Platforms
    Unix/X11 Windows

    Default Re: A close button in QMenuBar

    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.

  4. #4
    Join Date
    Jul 2008
    Location
    Germany
    Posts
    509
    Thanks
    11
    Thanked 76 Times in 74 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: A close button in QMenuBar

    I'm afraid I don't know what you mean by "TabbedView mode"
    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.
    Last edited by Ginsengelf; 5th June 2009 at 09:45. Reason: new insight

Similar Threads

  1. How to hide Close Button "X" on Widget ?
    By merry in forum Qt Programming
    Replies: 8
    Last Post: 25th January 2020, 08:03
  2. Disable Close button (X) of a QDialog
    By BrainB0ne in forum Qt Programming
    Replies: 29
    Last Post: 8th December 2009, 17:01
  3. QDialog not showing close button on Mac
    By manojmka in forum Qt Programming
    Replies: 2
    Last Post: 17th September 2008, 12:56
  4. Replies: 5
    Last Post: 21st April 2008, 07:54
  5. Replies: 3
    Last Post: 16th November 2006, 12:24

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.