PDA

View Full Version : widget that acts like KDE konsole



RenanBS
24th January 2011, 23:20
just need some advice, what widget should I use to develop a application that acts like KDE konsole? I don't want to create a konsole, but just run functions (from my own app) from something that looks like a command line.

Any ideas?

Renan

wysota
25th January 2011, 00:44
Use QProcess to talk to a shell (like bash).

Wait... maybe I misunderstood. If you want to provide a console-like interface for your own program then use QTextEdit. Just handle the keys correctly.

RenanBS
25th January 2011, 01:29
Following your advice, now I'm using QTextEdit.
I changed the background color to black, so it looks like a console window, but the text cursor (caret) is always black. I haven't found a way of changing it's color. Any advices?

wysota
25th January 2011, 02:00
I'm afraid this is not something you can do in five minutes. You can try changing the text edit's palette but this will probably not work. You'd probably have to implement your own document layout to do your own painting.