Results 1 to 3 of 3

Thread: How to draw thumbnail in treeview?

  1. #1
    Join Date
    Sep 2008
    Posts
    23
    Thanks
    1
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11

    Question How to draw thumbnail in treeview?

    hi, there
    I use the treeview to display the dir tree and I want to display a customized thumbnail image along side the name of each folder. The thumbnail is randomly draw from the images contained within the folder. Can someone please give me a hint how to implement that? Thanks ahead.
    zl2k
    Last edited by zl2k; 6th November 2008 at 16:19.

  2. #2
    Join Date
    Aug 2008
    Location
    Ukraine, Krivoy Rog
    Posts
    1,963
    Thanked 370 Times in 336 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: How to draw thumbnail in treeview?

    see this method QDirModel::setIconProvider for more detailes and also QFileIconProvider.
    Qt Assistant -- rocks!
    please, use tags [CODE] & [/CODE].

  3. #3
    Join Date
    Sep 2008
    Posts
    23
    Thanks
    1
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11

    Default Re: How to draw thumbnail in treeview?

    Quote Originally Posted by spirit View Post
    see this method QDirModel::setIconProvider for more detailes and also QFileIconProvider.
    Thanks for your comment. It works.
    Last edited by zl2k; 6th November 2008 at 20:58.

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.