Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. How to save an existing file from another path to my desktop?

How to save an existing file from another path to my desktop?

Scheduled Pinned Locked Moved Solved General and Desktop
5 Posts 3 Posters 434 Views 2 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • RipleyR Offline
    RipleyR Offline
    Ripley
    wrote on last edited by
    #1

    Hi Guys.

    I am new in the community, my problem is when building a pushbotton on my interface called "Download Template" his main fuction is gives to the user an existing document to their desktop or in case the user select the path where shall save it. I used the class getSaveFileName to open a pop up selecting where save the existing file but I don't know where could begin. CLICK HERE

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi and welcome to devnet,

      Your question is not exactly clear.

      At what point are you currently ?
      What do you mean by "I don't know where could begin" ?

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      RipleyR 1 Reply Last reply
      0
      • SGaistS SGaist

        Hi and welcome to devnet,

        Your question is not exactly clear.

        At what point are you currently ?
        What do you mean by "I don't know where could begin" ?

        RipleyR Offline
        RipleyR Offline
        Ripley
        wrote on last edited by
        #3

        @SGaist Hi friend I just want to save an existing file in another path through a button where an pop up show and you could tell where save it. Here are an little example of my code, it should help you.

        void DataSheetEdit::on_saveDatasheetButton_clicked()
        {
            QString Path = "/path/here";
            QFileDialog::getSaveFileName(this, "Where you want to save the template", Path , tr("Documents (*.docx *.doc *.odt)"));
        }
        
        aha_1980A 1 Reply Last reply
        0
        • RipleyR Ripley

          @SGaist Hi friend I just want to save an existing file in another path through a button where an pop up show and you could tell where save it. Here are an little example of my code, it should help you.

          void DataSheetEdit::on_saveDatasheetButton_clicked()
          {
              QString Path = "/path/here";
              QFileDialog::getSaveFileName(this, "Where you want to save the template", Path , tr("Documents (*.docx *.doc *.odt)"));
          }
          
          aha_1980A Offline
          aha_1980A Offline
          aha_1980
          Lifetime Qt Champion
          wrote on last edited by
          #4

          @Ripley

          https://stackoverflow.com/questions/39169530/qt-how-to-copy-file-with-qfilecopy-using-qfiledialog

          There are much more results with a simple google search "qt copy file"

          Qt has to stay free or it will die.

          RipleyR 1 Reply Last reply
          2
          • aha_1980A aha_1980

            @Ripley

            https://stackoverflow.com/questions/39169530/qt-how-to-copy-file-with-qfilecopy-using-qfiledialog

            There are much more results with a simple google search "qt copy file"

            RipleyR Offline
            RipleyR Offline
            Ripley
            wrote on last edited by
            #5

            @aha_1980 Thanks a lot, this url help me.

            1 Reply Last reply
            1

            • Login

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • Users
            • Groups
            • Search
            • Get Qt Extensions
            • Unsolved