Results 1 to 5 of 5

Thread: Hiding MessageBox window icon

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jan 2011
    Posts
    5
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Windows

    Question Hiding MessageBox window icon

    I`ve got one small question, about MessageBox, especially about property setWindowIson(). I would like to know if there is a possibility to hide this icon that appears in this MessageBox?

  2. #2
    Join Date
    Dec 2009
    Posts
    128
    Thanks
    7
    Thanked 14 Times in 14 Posts
    Platforms
    Unix/X11 Windows

    Default Re: Hiding MessageBox window icon


  3. #3
    Join Date
    Jan 2011
    Posts
    5
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Hiding MessageBox window icon

    No this icon. I mean the icon in title bar. Next to title of a messagebox

  4. #4
    Join Date
    Jan 2011
    Posts
    5
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Hiding MessageBox window icon

    Can anyone help me?

  5. #5
    Join Date
    Oct 2009
    Location
    Germany
    Posts
    120
    Thanked 42 Times in 41 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: Hiding MessageBox window icon

    If you do not need the system icons, you could try something like
    Qt Code:
    1. QMessageBox m(parent);
    2. m.setWindowFlags(Qt::Dialog | Qt::CustomizeWindowHint | Qt::WindowTitleHint);
    To copy to clipboard, switch view to plain text mode 

    Alternatively, you could create a completely transparent icon and assign it to the message box object
    Qt Code:
    1. m.setWindowIcon("MyCompletlyTransparentIcon.png");
    To copy to clipboard, switch view to plain text mode 
    This has the drawback that the dialog title still is shown at its original position, i.e. it is not shown at the left border.

    Your question is not specific to QMessageBox. It applies to QDialog equally. Searching the WEB for "hiding icon on QDialog title bar" or something similar will show you some platform specific solutions.

Similar Threads

  1. Getting the Icon of a MessageBox
    By thru in forum Qt Programming
    Replies: 2
    Last Post: 29th December 2010, 17:19
  2. Hiding ToolBars/Docks From Main window
    By ComaWhite in forum Qt Programming
    Replies: 1
    Last Post: 9th April 2010, 04:32
  3. Hiding a window from the taskbar
    By andyp in forum Qt Programming
    Replies: 1
    Last Post: 16th August 2009, 18:34
  4. Couple of questions: main window icon + toolbar icon
    By bpackard in forum Qt Programming
    Replies: 0
    Last Post: 20th March 2008, 19:03
  5. Problem hiding main window on minimize
    By bpetty in forum Newbie
    Replies: 5
    Last Post: 18th September 2007, 17:41

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.