Results 1 to 3 of 3

Thread: How can I display thumbnails with filenames under them?

  1. #1

    Default How can I display thumbnails with filenames under them?

    Hi all,
    I am trying to write a Image viewer, when you select certain folder, the thumbnails of all the pictures under the folder would display at QGraphicsView, and when you click on one thumbnail, the original picture would display below. I make QGraphicsItems with thumbnail and add them into QGraphicsScene then display them in the QGraphicsView. See the screenshot for details.
    ScreenShot002..jpg
    However, I can only display the thumbnails now, how can I display the thumbnails with their filenames under them? Just like the Windows does.
    ScreenShot003..jpg
    Also, How can I change the foucs item style? I dont like the dash line for the QGraphicsItem.

    Can anyone give me any suggestion about that? I really appreciate your help!

  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: How can I display thumbnails with filenames under them?

    Why are you using Graphics View and not the Model-View approach for this? You'd have everything ready out of the box.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  3. #3

    Default Re: How can I display thumbnails with filenames under them?

    Hi wysota,
    Thanks for your reply, since I just started with QT for two weeks, I have not come to the the Model-View approach yet.
    I just searched for the Model-View approach. For my case, do I need to make a custom subclass of QAbstractItemModel? Can you talk a little more specific about the Model-View approach? Either some names of specific classes or an example would help me greatly.
    Thanks again for your help.

Similar Threads

  1. Creating thumbnails efficiently
    By Luc4 in forum Qt Programming
    Replies: 5
    Last Post: 8th April 2010, 14:05
  2. Need some advise with thumbnails and loading image
    By nmuntz in forum Qt Programming
    Replies: 2
    Last Post: 9th June 2009, 14:32
  3. Storing filenames in QString: a bad idea?
    By drhex in forum Qt Programming
    Replies: 4
    Last Post: 25th August 2008, 22:21
  4. getting filenames
    By ht1 in forum Qt Programming
    Replies: 18
    Last Post: 10th December 2007, 17:34
  5. Preserving filenames in QProcess
    By Pepe in forum Qt Programming
    Replies: 1
    Last Post: 20th June 2007, 22:00

Tags for this Thread

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.