Results 1 to 3 of 3

Thread: Adding icons on title bar of mainwindow

  1. #1
    Join Date
    Mar 2012
    Location
    India
    Posts
    102
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11
    Thanks
    4

    Default Adding icons on title bar of mainwindow

    Hi,

    I want to customize my mainwindow title bar. I want to show my device battery status by an icon and other stuffs like my own Icon instead of the default Qt icon. How do I achieve this. My target OS is linux.

    Thanks in advance.

  2. #2
    Join Date
    Sep 2011
    Posts
    1,241
    Qt products
    Qt4
    Platforms
    Windows
    Thanks
    3
    Thanked 127 Times in 126 Posts

    Default Re: Adding icons on title bar of mainwindow

    If you have a problem, CUT and PASTE your code. Do not retype or simplify it. Give a COMPLETE and COMPILABLE example of your problem. Otherwise we are all guessing the problem from a fabrication where relevant details are often missing.

  3. #3
    Join Date
    Mar 2012
    Location
    India
    Posts
    102
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11
    Thanks
    4

    Default Re: Adding icons on title bar of mainwindow

    Ok. I figured out the title bar cannot be controlled from within Qt. It is controlled by the Windows Manager. So if we want a custom title bar then we need to remove the existing one by setting the flag Qt::FramelessWindowHint and then create our own title bar in the ui file by using label or any suitable widget.

Similar Threads

  1. Adding Icons
    By bijan311 in forum Newbie
    Replies: 2
    Last Post: 27th March 2010, 23:43
  2. Replies: 1
    Last Post: 22nd February 2010, 11:53
  3. Title Bar Alignment and mainwindow options
    By Krish_ng in forum Qt Programming
    Replies: 6
    Last Post: 16th July 2007, 09:10
  4. Replies: 9
    Last Post: 11th January 2007, 16:34
  5. Customizing Mainwindow's title bar
    By Anitha in forum Qt Programming
    Replies: 3
    Last Post: 13th February 2006, 14:13

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.