Implement something like tar archive in windows environment
-
IIRC, qmake can generate Visual Studio Solutions that should handle that for you. Worth a try at least.
-
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? -
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? -
You can use a QProgressBar with both min and max set to 0. This will give you an "infinite" animated bar.
-
You can use a QProgressBar with both min and max set to 0. This will give you an "infinite" animated bar.
@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).
-
If you'd like to avoid your GUI freezing, then yes. However, you should take a look at QtConcurrent::run before diving into QThread.
-
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?
@Zgembo
Hi
Maybe you can use
http://doc.qt.io/qt-5/qfuturewatcher.html#details
to avoid the waitForFinished ?