shell-to-KTextBrowser

Joachim Ansorg jansorg at gmx.de
Sun May 27 07:02:25 BST 2001


Convert \n in the output of nmap to <BR>, because HTML use <BR> instead of \n 
for lin breaks.
To do this use something like (not tested):

QString text = "some output\nmore\nmore\nend.";
text.replace(QRegExp("\n"), "<BR>");

Text should be now "some output<BR>more<BR>more<BR>end.";


Joachim


> Hi all,
> I got this question , I'm building a front-end to nmap  , I know how to
> catch the stdout via KShellProcess but the output to the KTextBrowser is
> different
>
> >from the one on the terminal , probably due to the tab or newline
>
> misunderstanding in the KTextBrowser or in QString conversion : does
> anybody know how to help me?
>
> Ciao
>
> Francesco

-
to unsubscribe from this list send an email to kdevelop-request at kdevelop.org with the following body:
unsubscribe »your-email-address«



More information about the KDevelop mailing list