PDA

View Full Version : QProcess formatting output



mvbhavsar
7th June 2018, 08:58
Hello All,

I am using QProcess to execute native commands and collecting command output using readAllStandardOutput() signal. Once I collected this output in QByteArray. This QByteArray value I am setting in QTextEdit.
QTextEdit is displaying the output put instead of formatted data it is showing ANSI color characters. I am attaching 2 images. First image is when I execute command in terminal and result is proper and second image is using QT.
Please help me to overcome this issue.

Thanks

Manish

Lesiok
7th June 2018, 10:35
You must format the data yourself before uploading them to QTextEdit. Read this article (https://stackoverflow.com/questions/26500429/qtextedit-and-colored-bash-like-output-emulation).