Results 1 to 4 of 4

Thread: Color of Titlebar and Menubar

  1. #1
    Join Date
    Jul 2007
    Posts
    166
    Thanks
    25
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Color of Titlebar and Menubar

    Hi,
    How can I load a picture into menubar as background ? And how can I set the color of Titlebar of MainWindow as black?

    Please help me...

  2. #2
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    6,264
    Thanks
    36
    Thanked 1,519 Times in 1,389 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: Color of Titlebar and Menubar

    Quote Originally Posted by sabeesh View Post
    How can I load a picture into menubar as background ?
    Customizing QMenuBar

    And how can I set the color of Titlebar of MainWindow as black?
    Window decoration is not provided by Qt but the underlying window system. The only thing you can do about it is to create a frameless window and draw a fake, custom title bar. Just be aware that in this case you have to handle window movement and resizing by hand too.
    J-P Nurmi

  3. #3
    Join Date
    Jul 2007
    Posts
    166
    Thanks
    25
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Unhappy Re: Color of Titlebar and Menubar

    Hi,
    I can't solve my probs using Customizing QMenuBar. My requirement is, I want to set the color or menubar. We can do it using
    menubar->setPalette(QPalette(QColor::QColor ( 160 , 176, 201 )));
    But I need a mixing of colors. So I create a .png file with that color and save it. I need to load that picture as background of menubar. How can I do it?
    Please help me

  4. #4
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    6,264
    Thanks
    36
    Thanked 1,519 Times in 1,389 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: Color of Titlebar and Menubar

    Take a look at The Box Model and List of Properties. Hint: "background-image".
    J-P Nurmi

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.