[英]Set text in QTextBrowser with a QString that includes QProcess enums
I want to write a QString that includes two QProcess enums into a QTextBrowser.我想将包含两个 QProcess 枚举的 QString 写入 QTextBrowser。 Therefore I used in one of my methods:因此,我在其中一种方法中使用了:
QString Text = "Error! Exit-Status: " + Status + QString(" Error-Code: ") + Prozess.error() + " File not created!"
Dialog.mytextBrowser -> setText(Text);
This also works, but the value of the QProcess::ExitStatus "Status" and the value of Prozess.error() are missing.这也有效,但是缺少 QProcess::ExitStatus“Status”的值和 Prozess.error() 的值。 What do I have to change to get the values into the QTextBrowser?我必须更改什么才能将值放入 QTextBrowser? greetings问候
Ok, problem was solved by QString Text = QString( "Error: Exit-Status: %1 Error-Code. %2 File not created." ).arg( Status );arg(Prozess.error());
好的,问题已通过 QString Text = QString( "Error: Exit-Status: %1 Error-Code. %2 File not created." ).arg( Status );arg(Prozess.error());
. . Anyway, thx for the support.无论如何,感谢支持。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.