Results 1 to 3 of 3

Thread: file name returned by QFileDialog::getSaveFileName()

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jan 2006
    Location
    Napoli, Italy
    Posts
    621
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows
    Thanks
    5
    Thanked 86 Times in 81 Posts

    Default Re: file name returned by QFileDialog::getSaveFileName()

    QFileDialog::getSaveFileName() doesn't add extension to fileName this because you can select a "multiple extension filter".
    For example

    Qt Code:
    1. fileName = QFileDialog::getSaveFileName(this, tr("Open File"), "", tr("Image Files (*.png *.bmp *.jpg)"));
    To copy to clipboard, switch view to plain text mode 

    Then you ave to specify the extension
    A camel can go 14 days without drink,
    I can't!!!

  2. #2
    Join Date
    Feb 2008
    Posts
    11
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows
    Thanks
    1

    Default Re: file name returned by QFileDialog::getSaveFileName()

    Quote Originally Posted by mcosta View Post
    QFileDialog::getSaveFileName() doesn't add extension to fileName this because you can select a "multiple extension filter".

    Then you have to specify the extension
    Makes sense. Thanks.

Similar Threads

  1. Set up the Qt4.3.2 with Visual Studio 2005
    By lamoda in forum Installation and Deployment
    Replies: 6
    Last Post: 30th January 2008, 07:51
  2. EXE File problem
    By triperzz in forum Installation and Deployment
    Replies: 8
    Last Post: 18th January 2008, 20:00
  3. file renaming on windows
    By jdd81 in forum Qt Programming
    Replies: 9
    Last Post: 2nd October 2007, 20:41
  4. qt-3.3.8 fail in scratchbox
    By nass in forum Installation and Deployment
    Replies: 0
    Last Post: 25th May 2007, 16:21
  5. Sending Binary File with QFTP
    By nbkhwjm in forum Newbie
    Replies: 2
    Last Post: 7th March 2007, 19:10

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.