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 Unzip folder in Qt?

How to Unzip folder in Qt?

Scheduled Pinned Locked Moved Unsolved General and Desktop
4 Posts 4 Posters 9.1k 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.
  • BharathiB Offline
    BharathiB Offline
    Bharathi
    wrote on last edited by A Former User
    #1

    How to Unzip the folder in Qt? and also I want to know after extracting the total folder is this possible to trigger an event or emit a signal in Qt??

    ? 1 Reply Last reply
    0
    • RatzzR Offline
      RatzzR Offline
      Ratzz
      wrote on last edited by Ratzz
      #2

      @Bharathi
      look at this http://stackoverflow.com/questions/4518129/qt-classes-to-zip-unzip-files
      http://stackoverflow.com/questions/2598117/zipping-a-folder-file-using-qt
      read about Zipping and unzipping files with Qt http://www.antonioborondo.com/2014/10/22/zipping-and-unzipping-files-with-qt/

      --Alles ist gut.

      1 Reply Last reply
      1
      • BharathiB Bharathi

        How to Unzip the folder in Qt? and also I want to know after extracting the total folder is this possible to trigger an event or emit a signal in Qt??

        ? Offline
        ? Offline
        A Former User
        wrote on last edited by
        #3

        @Bharathi Much simpler solution: Use QProcess to call an external zip-program, like:

        const QString program = "C:/Program Files/zip.exe";
        const QStringList arguments = QStringList() << "-X0q" << fileName << "mimetype";
        QProcess process;
        process.setWorkingDirectory(epubDirectoryPath);
        process.start(program, arguments);
        process.waitForFinished(-1);
        
        1 Reply Last reply
        1
        • VRoninV Offline
          VRoninV Offline
          VRonin
          wrote on last edited by
          #4

          Since it was not mentioned before, KArchive from KDE (works on all Qt platforms) is capable of zipping/unzipping multiple archive formats and comes with examples.

          For zip only QuaZIP in another option. The advantage is that it only links to zlib

          "La mort n'est rien, mais vivre vaincu et sans gloire, c'est mourir tous les jours"
          ~Napoleon Bonaparte

          On a crusade to banish setIndexWidget() from the holy land of Qt

          1 Reply Last reply
          3

          • Login

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