Results 1 to 4 of 4

Thread: QTreeView - different icon sizes on sublevels?

  1. #1
    Join Date
    Apr 2006
    Location
    Denmark / Norway
    Posts
    67
    Thanks
    3
    Thanked 12 Times in 8 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Windows

    Default QTreeView - different icon sizes on sublevels?

    Hi

    I'm wondering if anyone has done a implementation with different icon sizes on lower sublevels on a treeview?

    Guess I have to subclass QTreeView, but if there was a direct way, I would do that instead...

    Leif

  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: QTreeView - different icon sizes on sublevels?

    I think it's just a matter of providing a custom delegate that will render different sizes of icons depending on the depth of the index. Of course also the sizeHint() implementation has to take that into consideration.

  3. #3
    Join Date
    Apr 2006
    Location
    Denmark / Norway
    Posts
    67
    Thanks
    3
    Thanked 12 Times in 8 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Windows

    Default Re: QTreeView - different icon sizes on sublevels?

    Thanks for the reply.

    Yes, it was a matter of of doing a custom delegate... and several threads on that already here, so it's now partially working... just a bit s l o w...

  4. #4
    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: QTreeView - different icon sizes on sublevels?

    What exactly is slow? Do you use index widgets or persistent model indexes?

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. toolbar icon sizes...
    By soul_rebel in forum KDE Forum
    Replies: 2
    Last Post: 20th March 2006, 19:21
  3. How to dispay an icon in the first column of QTreeView
    By yogeshm02 in forum Qt Programming
    Replies: 1
    Last Post: 5th January 2006, 15:51

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.