PDA

View Full Version : Showing the output from cmake on my widget



jsmax
18th May 2007, 15:47
Hi, i have a QListWidget that prints the output from a cmake process. But cmake prints its output on a terminal with colors .. How can i get those colors ?? Is there a way to do that ?? Thanks ...

marcel
18th May 2007, 18:37
:)
Tough question.
Better I tell you how I would do it.
- I'd examine very carefully which color represents what in the output ( or better yet look at the cmake sources and analyze the output section - more likely to understand everything )
- Get the output
- Parse it and organize it in color categories ( I assume cmake has a well behaved output structure )
- The use style sheets or whatever to draw the highlighted text in your widget ( or use a QTextEdit and format the text appropriately ).

Not easy, but could work.

jsmax
18th May 2007, 19:53
This way i know :) but, anyway, thanks for reply ...

P.S. Doar konsole (sau orice terminal) arata cumva culorile .. mi'i lene sa citesc sursele ...:o

marcel
18th May 2007, 20:17
:)
I doubt there is any other way.
After all, the cmake output is just text. It is your responsibility to reformat it, etc.

Regards