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 cut and paste file using Qt?
QtWS25 Last Chance

How to cut and paste file using Qt?

Scheduled Pinned Locked Moved Solved General and Desktop
6 Posts 3 Posters 2.2k Views
  • 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.
  • HarbH Offline
    HarbH Offline
    Harb
    wrote on last edited by
    #1

    Hi!
    In my application I need to implement cut/paste file programmaticaly. How I can do It with Qt?

    M 1 Reply Last reply
    0
    • HarbH Harb

      Hi!
      In my application I need to implement cut/paste file programmaticaly. How I can do It with Qt?

      M Offline
      M Offline
      mlong
      wrote on last edited by
      #2

      @Harb Have you looked into QClipboard yet? You might start there and look at the platform-specific notes.

      Software Engineer
      My views and opinions do not necessarily reflect those of anyone -- living or dead, real or fictional -- in this universe or any other similar multiverse node. Void where prohibited. Your mileage may vary. Caveat emptor.

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

        Hi,

        Do you mean move files around like with QFile::rename or as @mlong suggested use the clipboard ?

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

        1 Reply Last reply
        2
        • HarbH Offline
          HarbH Offline
          Harb
          wrote on last edited by
          #4

          Well, I just need to move files from one folder to antother from my application. So, it is like applying cut windows opeartion, and than paste windows opeartion. In fact just changing file path, without real copying any data.

          1 Reply Last reply
          0
          • HarbH Offline
            HarbH Offline
            Harb
            wrote on last edited by
            #5

            Well, I got it. Just by renaming file. In any case tnx for answers!

            1 Reply Last reply
            0
            • M Offline
              M Offline
              mlong
              wrote on last edited by
              #6

              No problem. Be sure and mark the thread as Solved!

              Software Engineer
              My views and opinions do not necessarily reflect those of anyone -- living or dead, real or fictional -- in this universe or any other similar multiverse node. Void where prohibited. Your mileage may vary. Caveat emptor.

              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