Results 1 to 6 of 6

Thread: saving into a directory

  1. #1
    Join Date
    Jan 2006
    Posts
    4
    Qt products
    Qt3
    Platforms
    Unix/X11 Windows

    Default saving into a directory

    Hi all,

    Opening a file dialog box helps to open a file. What i want to do is, not to open a file but save a file into the directory that the user selects. Does "QFileDialog" class have this functionality? If not, what is the way to select a directory in which a file is to be saved?

    Thanks.

  2. #2
    Join Date
    Jan 2006
    Location
    Ukraine,Lviv
    Posts
    454
    Thanks
    9
    Thanked 27 Times in 27 Posts
    Qt products
    Qt3
    Platforms
    Unix/X11 Windows

    Default Re: saving into a directory

    use
    Qt Code:
    1. QFileDialog::getSaveFileName
    To copy to clipboard, switch view to plain text mode 

  3. #3
    Join Date
    Jan 2006
    Location
    Paris, France
    Posts
    227
    Thanks
    3
    Thanked 21 Times in 21 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: saving into a directory

    Sure,

    Just check QFileDialog::getSaveFileName() in the docs !
    It's exactly what you want

    Guilugi.

  4. #4
    Join Date
    Jan 2006
    Location
    Paris, France
    Posts
    227
    Thanks
    3
    Thanked 21 Times in 21 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Wink Re: saving into a directory

    rhhaaa, too slow

  5. #5
    Join Date
    Jan 2006
    Posts
    4
    Qt products
    Qt3
    Platforms
    Unix/X11 Windows

    Default Re: saving into a directory

    No, I could not explain the problem clearly. What i want is make the user select a directory from the dialog without writing the name of the file in the dialog. Because the program will give 3 output files whose names are formed by the program. But to ease the work of the user and see the location of the output files, i want the user to give me the directory name to collect the output files. I don't want a file name i mean. I hope this is clearer.

    Thanks.

  6. #6
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    5,372
    Thanks
    28
    Thanked 976 Times in 912 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: saving into a directory

    Quote Originally Posted by Bahar
    i want the user to give me the directory name to collect the output files.
    Then use QFileDialog::getExistingDirectory().

Similar Threads

  1. install help nedded.
    By aj2903 in forum Installation and Deployment
    Replies: 9
    Last Post: 13th November 2008, 07:57
  2. qt-3.3.8 fail in scratchbox
    By nass in forum Installation and Deployment
    Replies: 0
    Last Post: 25th May 2007, 15:21
  3. error in compiling qtopia.....
    By sar_van81 in forum Qt for Embedded and Mobile
    Replies: 3
    Last Post: 11th January 2007, 09:10
  4. errors while installing Qt4.2 in Linux
    By nimmyj in forum Installation and Deployment
    Replies: 11
    Last Post: 13th December 2006, 11:58
  5. Am I the only one with "make" error ?
    By probine in forum Installation and Deployment
    Replies: 1
    Last Post: 13th February 2006, 12:54

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.