Results 1 to 2 of 2

Thread: How to remove the default menu on the left side of the title bar - Qt?

  1. #1
    Join Date
    Apr 2011
    Posts
    231
    Thanks
    141
    Thanked 6 Times in 5 Posts

    Default How to remove the default menu on the left side of the title bar - Qt?

    Qt Code:
    1. Qt :: WindowFlags flags = 0;
    2.  
    3. // Makes the Pomodoro stay on the top of all windows.
    4. flags |= Qt :: WindowStaysOnTopHint;
    5.  
    6. // Removes minimize, maximize, and close buttons.
    7. flags |= Qt :: WindowTitleHint | Qt :: CustomizeWindowHint;
    8.  
    9. window->setWindowFlags (flags);
    10. window->setWindowTitle ("Failing to plan is planning to fail");
    To copy to clipboard, switch view to plain text mode 
    This removes minimize, maximize, and close buttons. The default menu on the left is still there. How to get rid of that?

    I want the title bar to be there, but just want the menu to be removed.

    Default menu contains: Minimize, Maximize, Move etc options.
    Last edited by TheIndependentAquarius; 15th February 2012 at 12:25.

  2. #2
    Join Date
    Sep 2011
    Location
    Manchester
    Posts
    538
    Thanks
    3
    Thanked 106 Times in 103 Posts
    Qt products
    Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: How to remove the default menu on the left side of the title bar - Qt?

    On what system?
    Qt Code:
    1. this->setWindowFlags( Qt :: WindowStaysOnTopHint | Qt::WindowTitleHint | Qt::CustomizeWindowHint );
    To copy to clipboard, switch view to plain text mode 
    works as you want on W7 and Ubuntu.

  3. The following user says thank you to Spitfire for this useful post:

    TheIndependentAquarius (17th July 2014)

Similar Threads

  1. Replies: 0
    Last Post: 14th July 2011, 07:42
  2. Remove Default Menu?
    By PLan2010 in forum Newbie
    Replies: 0
    Last Post: 5th March 2011, 23:09
  3. Replies: 0
    Last Post: 6th September 2009, 21:58
  4. [QTabWidget] horizontal text on left side
    By Boy in forum Qt Programming
    Replies: 6
    Last Post: 16th May 2008, 08:52
  5. scrollbar on left side of qtextedit
    By piotrek in forum Qt Programming
    Replies: 1
    Last Post: 15th February 2008, 21:07

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.