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. Implement something like tar archive in windows environment
Qt 6.11 is out! See what's new in the release blog

Implement something like tar archive in windows environment

Scheduled Pinned Locked Moved General and Desktop
47 Posts 8 Posters 37.8k Views 4 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.
  • SGaistS Offline
    SGaistS Offline
    SGaist
    Lifetime Qt Champion
    wrote on last edited by
    #38

    IIRC, qmake can generate Visual Studio Solutions that should handle that for you. Worth a try at least.

    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
    1
    • ZgemboZ Offline
      ZgemboZ Offline
      Zgembo
      wrote on last edited by
      #39

      I have moved everything to my main project and it works. Now I can tar and untar files form my main project.

      Right now I am trying to figure out best way to indicate to a user that archiving or unarchiving process is in progress. I was thinking of using qprogressbar but I do not see a way to send any signal from KArchive function to qprogressbar.
      Lets say that I have for example three large files to unarchive (few gigabytes). What would be the best way to somehow indicate to a user what is going on?

      mrjjM 1 Reply Last reply
      0
      • ZgemboZ Zgembo

        I have moved everything to my main project and it works. Now I can tar and untar files form my main project.

        Right now I am trying to figure out best way to indicate to a user that archiving or unarchiving process is in progress. I was thinking of using qprogressbar but I do not see a way to send any signal from KArchive function to qprogressbar.
        Lets say that I have for example three large files to unarchive (few gigabytes). What would be the best way to somehow indicate to a user what is going on?

        mrjjM Offline
        mrjjM Offline
        mrjj
        Lifetime Qt Champion
        wrote on last edited by
        #40

        @Zgembo
        In cases where you cannot know the length of the process/get status,
        you can use a QLabel with a animated gif.
        like
        alt text

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

          You can use a QProgressBar with both min and max set to 0. This will give you an "infinite" animated bar.

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

          ZgemboZ 1 Reply Last reply
          1
          • SGaistS SGaist

            You can use a QProgressBar with both min and max set to 0. This will give you an "infinite" animated bar.

            ZgemboZ Offline
            ZgemboZ Offline
            Zgembo
            wrote on last edited by
            #42

            @SGaist I have tried your suggestion using "infinite" progress bar, but my tar and untar functions take a lot of processing power and animation is not working.

            What would be the best way to move for example my two function to another thread? I have two function tarArchive(QString, QString) and unTarArchive(QString, QString).

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

              If you'd like to avoid your GUI freezing, then yes. However, you should take a look at QtConcurrent::run before diving into QThread.

              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
              0
              • ZgemboZ Offline
                ZgemboZ Offline
                Zgembo
                wrote on last edited by
                #44

                I have tried QtConcurrent::run but I have to wait before the process (tar and untar) that I have moved to another thread finishes. So I have to use waitForFinished() and my GUI still freezes. Any suggestions?

                mrjjM 1 Reply Last reply
                0
                • ZgemboZ Zgembo

                  I have tried QtConcurrent::run but I have to wait before the process (tar and untar) that I have moved to another thread finishes. So I have to use waitForFinished() and my GUI still freezes. Any suggestions?

                  mrjjM Offline
                  mrjjM Offline
                  mrjj
                  Lifetime Qt Champion
                  wrote on last edited by
                  #45

                  @Zgembo
                  Hi
                  Maybe you can use
                  http://doc.qt.io/qt-5/qfuturewatcher.html#details
                  to avoid the waitForFinished ?

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

                    @Zgembo How did you implement that ?

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

                    ZgemboZ 1 Reply Last reply
                    1
                    • SGaistS SGaist

                      @Zgembo How did you implement that ?

                      ZgemboZ Offline
                      ZgemboZ Offline
                      Zgembo
                      wrote on last edited by
                      #47

                      @SGaist I figured out that first I have to change my program logic to implement QtConcurrent::run. Anyway thank you and @VRonin for all the help you provided in this thread. I will close it as solved.

                      1 Reply Last reply
                      0

                      • Login

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