Results 1 to 4 of 4

Thread: widget that acts like KDE konsole

  1. #1
    Join Date
    Oct 2010
    Location
    Porto Alegre
    Posts
    19
    Thanks
    3
    Thanked 2 Times in 1 Post
    Qt products
    Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android

    Default widget that acts like KDE konsole

    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

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: widget that acts like KDE konsole

    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.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  3. The following user says thank you to wysota for this useful post:

    RenanBS (25th January 2011)

  4. #3
    Join Date
    Oct 2010
    Location
    Porto Alegre
    Posts
    19
    Thanks
    3
    Thanked 2 Times in 1 Post
    Qt products
    Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android

    Default Re: widget that acts like KDE konsole

    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?
    Last edited by RenanBS; 25th January 2011 at 01:29.

  5. #4
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: widget that acts like KDE konsole

    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.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


Similar Threads

  1. How to Get Konsole Command Output?
    By Furkan in forum Newbie
    Replies: 5
    Last Post: 14th April 2010, 20:16
  2. Replies: 4
    Last Post: 3rd March 2008, 22:15
  3. Read/Write on a konsole from Qt app
    By Joccy in forum Qt Programming
    Replies: 9
    Last Post: 4th February 2008, 12:21
  4. Replies: 1
    Last Post: 5th November 2006, 23:50
  5. dislplay info in konsole?
    By lum in forum KDE Forum
    Replies: 1
    Last Post: 27th April 2006, 16:49

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.