Results 1 to 6 of 6

Thread: Thumbnails arranged in a grid

  1. #1
    Join Date
    Sep 2010
    Posts
    21
    Thanks
    2
    Qt products
    Qt4
    Platforms
    MacOS X Windows

    Default Thumbnails arranged in a grid

    Hi all

    I need to create an "asset browser" which shows media assets (like images, videos, audio files, etc) in a grid. The grid should consist of thumbnails or static pictures (in the case of a sound file). I would like to choose a fixed size of the thumbnails and when I resize the area - more should be shown (not the thumbnails resized).

    I am wondering which combination of widgets for container and asset thumbnail would be the best suited.

    Any ideas?

    Cheers,
    Michael

  2. #2
    Join Date
    Jan 2006
    Location
    Germany
    Posts
    4,380
    Thanks
    19
    Thanked 1,005 Times in 913 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows Symbian S60
    Wiki edits
    5

    Default Re: Thumbnails arranged in a grid

    QListView with IconMode. Or if you need more control use a QGraphicsView, but then you have to take care for all the positioning.

  3. #3
    Join Date
    Sep 2010
    Posts
    21
    Thanks
    2
    Qt products
    Qt4
    Platforms
    MacOS X Windows

    Default Re: Thumbnails arranged in a grid

    Thanks, Lykurg - will try that!

    Cheers,
    Michael

  4. #4
    Join Date
    Oct 2010
    Posts
    37
    Thanks
    3
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: Thumbnails arranged in a grid

    You can also try a gridview with a bunch of QLabels.
    QLabel label; label.setPixmap(p); arranged in a grid.

  5. #5
    Join Date
    Sep 2010
    Posts
    21
    Thanks
    2
    Qt products
    Qt4
    Platforms
    MacOS X Windows

    Default Re: Thumbnails arranged in a grid

    Ah okay - another approach to try out Have you done something like that?

  6. #6
    Join Date
    Jan 2006
    Location
    Germany
    Posts
    4,380
    Thanks
    19
    Thanked 1,005 Times in 913 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows Symbian S60
    Wiki edits
    5

    Default Re: Thumbnails arranged in a grid

    ...and you can write your own layout class which arranges widgets in a grid. Most easiest way is same size widgets in a flow layout (which you can find in the documentation).

Similar Threads

  1. Better Grid
    By Buby in forum Newbie
    Replies: 2
    Last Post: 7th September 2010, 09:18
  2. Replies: 0
    Last Post: 3rd July 2010, 09:31
  3. Replies: 2
    Last Post: 18th June 2010, 15:05
  4. Creating thumbnails efficiently
    By Luc4 in forum Qt Programming
    Replies: 5
    Last Post: 8th April 2010, 14:05
  5. Need some advise with thumbnails and loading image
    By nmuntz in forum Qt Programming
    Replies: 2
    Last Post: 9th June 2009, 14:32

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.