Results 1 to 3 of 3

Thread: QToolBar Stylesheet

  1. #1
    Join Date
    Jan 2006
    Location
    Paris, France
    Posts
    227
    Thanks
    3
    Thanked 21 Times in 21 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default QToolBar Stylesheet

    Hi there,

    I'd like to apply a background image to customize a little my toolbars, and I set this stylesheet :
    Qt Code:
    1. qApp->setStyleSheet(QToolBar{background-image: url(":/mybg.png")};
    To copy to clipboard, switch view to plain text mode 

    It works fine, except on the grip zone, which is used to drag the toolbar anywhere in the workspace.
    And I don't know how to apply the background to this zone : I tried something like QToolBar > *, without effect.

    Any hint ?

    Thanks,
    Guilugi.

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: QToolBar Stylesheet

    Try QToolBar::handle { ... }

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

    guilugi (5th July 2007)

  4. #3
    Join Date
    Jan 2006
    Location
    Paris, France
    Posts
    227
    Thanks
    3
    Thanked 21 Times in 21 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: QToolBar Stylesheet

    Thanks, it works great ;-)

Similar Threads

  1. Various icon sizes for QToolButtons on QToolbar
    By Erlendhg in forum Qt Programming
    Replies: 4
    Last Post: 30th June 2007, 18:35
  2. How Do I Float a QToolBar?
    By dvmorris in forum Qt Programming
    Replies: 7
    Last Post: 29th April 2007, 19:01
  3. QToolBar help please
    By munna in forum Qt Programming
    Replies: 3
    Last Post: 29th June 2006, 17:18
  4. QToolBar in a new UI form?
    By gfunk in forum Qt Tools
    Replies: 7
    Last Post: 2nd June 2006, 11:19
  5. Insert separate QToolBar into QMainWindow
    By YuriyRusinov in forum Qt Programming
    Replies: 3
    Last Post: 24th April 2006, 10:37

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.