Results 1 to 5 of 5

Thread: Reuse saved file name

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Aug 2021
    Posts
    3
    Thanks
    1
    Qt products
    Qt5
    Platforms
    Windows

    Default Reuse saved file name

    Hello! I'm new to Qt designer and programming. I tried to create a file (e.g. "sample") using the below function and want to autosave the file every x minutes using 'timer'. But each time I am getting a prompt to select a new file. My question: How can I reuse the same file i.e. "sample" without getting prompts and save data in it.

    Qt Code:
    1. def sampleSave(self):
    2. QtWidgets.QFileDialog.getSaveFileName(caption="Choose file to save configuration")
    3.  
    4. timer = threading.Timer(300, self.sampleSave)
    5. timer.start()
    To copy to clipboard, switch view to plain text mode 
    Last edited by d_stranz; 10th August 2021 at 17:18. Reason: missing [code] tags

Similar Threads

  1. Automatic file extension is not added to saved file on mac os x
    By sanjayshelke in forum Qt Programming
    Replies: 0
    Last Post: 30th October 2009, 06:56
  2. reuse QtDesigner?
    By nicolas1 in forum Qt Programming
    Replies: 5
    Last Post: 22nd March 2009, 14:00
  3. QPainter reuse within a paintEvent
    By Micawber in forum Qt Programming
    Replies: 2
    Last Post: 2nd May 2008, 16:51
  4. can't reuse a pure c++ .h file's methods and classes
    By sincnarf in forum General Programming
    Replies: 11
    Last Post: 3rd August 2007, 03:39
  5. Reuse QT code in QTEmbedded
    By the_bis in forum Newbie
    Replies: 3
    Last Post: 8th September 2006, 18:03

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.