Results 1 to 5 of 5

Thread: How to remove default toolbar?

  1. #1
    Join Date
    Nov 2009
    Location
    US, Midwest
    Posts
    215
    Thanks
    62
    Thanked 4 Times in 4 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default How to remove default toolbar?

    I am using QMainWindow and upon initialization I am adding two toolbars on my own. The result is shown in the attached screenshot.

    My question is: how to remove default toolbar? I did not find any method that does that.
    Attached Images Attached Images

  2. #2
    Join Date
    Jan 2006
    Location
    Belgium
    Posts
    1,938
    Thanked 268 Times in 268 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows
    Wiki edits
    20

    Default Re: How to remove default toolbar?


  3. #3
    Join Date
    Nov 2009
    Location
    US, Midwest
    Posts
    215
    Thanks
    62
    Thanked 4 Times in 4 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: How to remove default toolbar?

    I apologize for not mentioning the fact that prior to posting my question I read QMainWindow documentation. All QMainWindow methods to remove toolbar require the pointer to the toolbar as argument. I did not find method to get the pointer to the default toolbar.

    So, I can restate the question this way: how to get the pointer to the default toolbar in QMainWindow?

  4. #4
    Join Date
    Jan 2006
    Location
    Belgium
    Posts
    1,938
    Thanked 268 Times in 268 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows
    Wiki edits
    20

    Default Re: How to remove default toolbar?

    Qt Code:
    1. ui->mainToolBar
    To copy to clipboard, switch view to plain text mode 
    Unless you changed the name.

  5. The following user says thank you to tbscope for this useful post:

    TorAn (5th December 2010)

  6. #5
    Join Date
    Jan 2006
    Location
    Germany
    Posts
    4,380
    Thanks
    19
    Thanked 1,005 Times in 913 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows Symbian S60
    Wiki edits
    5

    Default Re: How to remove default toolbar?

    ...or remove the toolbar in your ui file. In the designer right click -> remove!

  7. The following user says thank you to Lykurg for this useful post:

    TorAn (5th December 2010)

Similar Threads

  1. Replies: 2
    Last Post: 7th September 2011, 17:34
  2. Replies: 5
    Last Post: 11th September 2010, 14:29
  3. remove default action QMenuBar() s60
    By pleasuretek in forum Qt for Embedded and Mobile
    Replies: 4
    Last Post: 4th July 2010, 00:17
  4. Remove default buttons
    By Yayati.Ekbote in forum Qt Programming
    Replies: 10
    Last Post: 16th April 2010, 18:27
  5. How to remove default 'ENTER' from QDialogButtonBox
    By janus in forum Qt Programming
    Replies: 6
    Last Post: 12th September 2008, 21:56

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
  •  
Qt is a trademark of The Qt Company.