[SOLVED]QProgressBar makes use QProcess?
-
Hello, I want to ask about the progress bar with qprocess.
If we make progressbar using qprocess, how to take the value of qprocess? -
Your process should have a mechanism for percent. For example if you run cmake with QProcess it will print progress on output and you can read it from beggining of line and set to QProgressBar
-
@Hamed.Masafi Suppose I want to use QProcess with the command "dd if = of =", while in the process that I want to use QProgressBar to determine the extent to which it wants to complete the process.
-
You can use pv with dd, for example:
pv -n /dev/urandom | dd of=/dev/null
That will be print progress on output, after that read output from QProcess and analyse it and extract percent progress and set it to QProgressBar
-
@Hamed.Masafi /dev/urandom it means what ??
-
@Renn Just an example combine your dd command with pv
-
@Hamed.Masafi /dev/null null why? Can you give me the clearest explanation to clear?
-
@Renn put your full dd command please
-
@Hamed.Masafi Okay I will try later, I want to ask again, if I want to remove my last fdisk partition of format, is able to put a value to the progress?
-
@Hamed.Masafi can so read the output through QProcess in runtime and combine them into progressbarnya it how? I've tried to use readAllStandardOutput() and readAll() do not read runtime.