Results 1 to 3 of 3

Thread: how to show previewof the selected images in the native dialog

  1. #1

    Question how to show previewof the selected images in the native dialog

    hello
    i am trying to develop an application in which a file dialog opens on a click of a push button.now the problem is when i select the images shown in file dialog ,i want to show the preview of that image before selecting the image.

  2. #2
    Join Date
    Oct 2006
    Location
    New Delhi, India
    Posts
    2,467
    Thanks
    8
    Thanked 334 Times in 317 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: how to show previewof the selected images in the native dialog

    You can use a QLabel to show the image. Use QLabel::setPixmap to set the image.
    pseudo code is :
    scaledImage = image.scaled(); // small size of original image
    label.setPixmap(scaledImage);
    Hope this helps

  3. #3
    Join Date
    Sep 2006
    Posts
    20
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: how to show previewof the selected images in the native dialog

    1. You can write your own FileDialog using QDialog and QDir.
    (2. Compromiss: If you programm for windows using QString QFileDialog::getOpenFileName, the result MS File Dialog has a thumbnails view.
    3. Compromiss: I can try to subclass and to change QFileDialog)

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.