Results 1 to 12 of 12

Thread: How to save file with QFileDialog

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jun 2008
    Location
    Bulgaria
    Posts
    5
    Qt products
    Qt4
    Platforms
    Windows

    Question How to save file with QFileDialog

    Hello,
    I read the QFileDialog class reference, but I still cannot solve the following problem:
    I want to impelement a posibility for the user to save a file. I use Python and PyQt4, but if you have a C++ solution please wirte it...
    I use:
    Qt Code:
    1. QtGui.QFileDialog.getSaveFileName(self, "Save file", "", ".conf")
    To copy to clipboard, switch view to plain text mode 

    But when I press the Save button from the showed Dialog, there is no saved file..
    I tried using:
    Qt Code:
    1. filename = QtGui.QFileDialog.getSaveFileName(self, "Save file", "", ".conf")
    To copy to clipboard, switch view to plain text mode 
    where filename is previosly opened file or string... but no success
    I read somewhere that getSavedFileName() returns the selected filename even if there is no such file (?!?!)

    I need your help.
    All the best!
    Last edited by pnikolov; 2nd July 2008 at 22:38. Reason: spelling error

Similar Threads

  1. QFileDialog and file extension
    By calhal in forum Qt Programming
    Replies: 3
    Last Post: 9th March 2010, 13:54
  2. 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
  3. QFileDialog and file sequences
    By peterhillman in forum Qt Programming
    Replies: 5
    Last Post: 24th November 2007, 11:16
  4. Replies: 4
    Last Post: 13th June 2007, 16:37
  5. qt-3.3.8 fail in scratchbox
    By nass in forum Installation and Deployment
    Replies: 0
    Last Post: 25th May 2007, 16:21

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.