Results 1 to 9 of 9

Thread: QFileDialog no thumnail view?

  1. #1
    Join Date
    Apr 2007
    Posts
    117
    Thanks
    84
    Thanked 1 Time in 1 Post
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default QFileDialog no thumnail view?

    Anybody here has ideas how I can implement a QFileDialog with thumbnail view? I can't see a thread like this
    Image Analysis Development Framework Using Qt (IADFUQ)

  2. #2
    Join Date
    Feb 2006
    Location
    Romania
    Posts
    2,744
    Thanks
    8
    Thanked 541 Times in 521 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: QFileDialog no thumnail view?

    It's ok on Vista. The file dialog is native. so if the platform supports thumbnail views then it should be there.
    Have you tested with other applications?

  3. #3
    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: QFileDialog no thumnail view?

    You can set a custom item delegate on the dialog using QFileDialog::setItemDelegate(). You can render the items as you want there.

  4. #4
    Join Date
    Feb 2006
    Location
    Romania
    Posts
    2,744
    Thanks
    8
    Thanked 541 Times in 521 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: QFileDialog no thumnail view?

    You can set a custom item delegate on the dialog using QFileDialog::setItemDelegate(). You can render the items as you want there.
    I think it is impossible(or at least a long way) to cover all the file formats that can be previewed by the native window manager.
    Maybe he can use delegates to preview image files in supported formats by Qt, but there are previews for pdf, avi, wmv, mpg, etc.

  5. #5
    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: QFileDialog no thumnail view?

    He asked for a way to implement a thumbnail file dialog, not for a ready solution. One can always use libMagick to generate thumbnails, it supports over 200 formats.

  6. #6
    Join Date
    Apr 2007
    Posts
    117
    Thanks
    84
    Thanked 1 Time in 1 Post
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: QFileDialog no thumnail view?

    Quote Originally Posted by marcel View Post
    It's ok on Vista. The file dialog is native. so if the platform supports thumbnail views then it should be there.
    Have you tested with other applications?
    i'm running on ubuntu feisty fawn... no I haven't tested with otherapps.

    I'm sorry to both the File dialog will only display images, so I do not need to generate thumbnails for other file extensions (I only want to filter jpeg png gif and bmp)
    Last edited by sincnarf; 13th October 2007 at 22:36.
    Image Analysis Development Framework Using Qt (IADFUQ)

  7. #7
    Join Date
    Feb 2006
    Location
    Romania
    Posts
    2,744
    Thanks
    8
    Thanked 541 Times in 521 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: QFileDialog no thumnail view?

    Then you can use Wysota's solution, with delegates.

  8. #8
    Join Date
    Apr 2007
    Posts
    117
    Thanks
    84
    Thanked 1 Time in 1 Post
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: QFileDialog no thumnail view?

    Quote Originally Posted by wysota View Post
    He asked for a way to implement a thumbnail file dialog, not for a ready solution. One can always use libMagick to generate thumbnails, it supports over 200 formats.
    Uh, I can't find an example for the item delegates
    Image Analysis Development Framework Using Qt (IADFUQ)

  9. #9
    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: QFileDialog no thumnail view?

    Delegate examples are in the itemviews directory. And many delegate threads are available on this forum, just try searching it.

Similar Threads

  1. QFileDialog in Qt designer
    By tpf80 in forum Qt Tools
    Replies: 1
    Last Post: 17th May 2007, 00:41
  2. Model, View and Proxy
    By No-Nonsense in forum Qt Programming
    Replies: 2
    Last Post: 21st November 2006, 08:50

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.