I have been copied from one place to another, needing to increase the progress bar in QT. There are 64 files to make a copy. How is it possible that the progress bar is known to increase the amount. The following is the help code you can terminate it.
class MyClass: ... {... public slot: write at zero (qint64); }; MyClass :: MyClass (...) {// ... progress-> Setxical (QFileInfo (fromFile). Size () / 1024); Written = 0; Connect (& toFile, Signal (Bytes Written (qint64)), Slot (Onset (qint64)); // ...} Zero MyClass :: onwrite (qint64 w) {written = = w; Progress-> Set val (written / 1024); }
You can get the current value and add new written bytes this.
Zero MyClass :: onwrite (qint64 w) {written = = w; Progress-> Set val (progress-> value () + written / 1024); }
Comments
Post a Comment