Results 1 to 3 of 3

Thread: QDockWidget and icons

  1. #1
    Join Date
    Jan 2009
    Posts
    3
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default QDockWidget and icons

    Hi everybody

    is there a way to add icons to the tabs of nested dock widgets. I'm looking for something like setTabIcon(...) but for QDockWidgets. setWindowIcon seems to do nothing at all.

  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: QDockWidget and icons

    I don't think it's supported feature by QDockWidget, but perhaps you can do the customization trick with style sheets.
    J-P Nurmi

  3. #3
    Join Date
    Jun 2009
    Posts
    5
    Thanks
    1
    Thanked 2 Times in 1 Post
    Platforms
    Unix/X11 Windows

    Default Re: QDockWidget and icons

    I've been trying to do this, with no success...

    The problem is that a QDockWidget looses it's objectname when it's docked.
    Because it's no longer a QDockWidget, but a tab in a QTabBar.

    I've set a stylesheet on the dockwidget, but it's ignored.

    Anyone tried to set icons for the tabs of docked dockwidgets?

    I've seen that a QTabBar doesn't have any function for getting a particular tab by name or object, only by index?

    If you need more information, yell.

Similar Threads

  1. QDockWidget
    By fellobo in forum Qt Programming
    Replies: 8
    Last Post: 26th June 2008, 18:52
  2. Default size of a QListWidget inside a QDockWidget
    By rakuco in forum Qt Programming
    Replies: 0
    Last Post: 25th July 2007, 08:01
  3. QDockWidget - features
    By moowy in forum Qt Programming
    Replies: 3
    Last Post: 31st August 2006, 14:18

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.