Results 1 to 13 of 13

Thread: how to browse images in thumbnail view?

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jun 2008
    Posts
    88
    Qt products
    Qt3 Qt4
    Platforms
    MacOS X Unix/X11
    Thanks
    4
    Thanked 4 Times in 3 Posts
    Wiki edits
    1

    Default Re: how to browse images in thumbnail view?

    Just an update...

    I did some digging into the replacement for Konqueror, "Dolphin", and it appears to be using an item view for its thumbnail view (a KCategorizedView which is derived from a QListView). At least as far as I can tell it doesnt appear to be taking advantage of the QGraphicsView.

    I'm assuming they're using that because they have a QDirModel driving it.

    It sure would be nice to have an open source thumbnail viewer that takes advantage of the QGraphicsView. Not that my code is all that fantastic, but if I make some headway on one I'll post some stuff back here at the very least.

  2. #2
    Join Date
    Jun 2008
    Posts
    88
    Qt products
    Qt3 Qt4
    Platforms
    MacOS X Unix/X11
    Thanks
    4
    Thanked 4 Times in 3 Posts
    Wiki edits
    1

    Default Re: how to browse images in thumbnail view?

    Ok, as promised I have some code that will hopefully get some people started, its attached as a PyQt example

    I apologize for the lack of comments and docstrings but this was more of a mockup than anything else

    Here's how to use:

    Qt Code:
    1. app = QtGui.QApplication([])
    2. widget = QdContactSheet()
    3. images = # list of images you want to view as thumbnails
    4. images.sort()
    5. widget.load(images)
    6.  
    7. widget.setWindowTitle("Contact Sheet")
    8. widget.resize(1000, 800)
    9. widget.show()
    10. app.exec_()
    To copy to clipboard, switch view to plain text mode 
    Attached Files Attached Files

  3. The following 2 users say thank you to chezifresh for this useful post:

    jfjf (9th February 2011), ksl871 (26th April 2012)

Similar Threads

  1. How to view images using QT
    By Pitso in forum Newbie
    Replies: 1
    Last Post: 16th April 2007, 14:00

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.