Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Embedded Console in Qt GUI
Forum Updated to NodeBB v4.3 + New Features

Embedded Console in Qt GUI

Scheduled Pinned Locked Moved General and Desktop
11 Posts 7 Posters 38.5k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • F Offline
    F Offline
    frankcyblogic.de
    wrote on 7 Jun 2011, 21:17 last edited by
    #2

    Maybe a QPlainText? You could overload keyPressEvent() to make it behave more like a terminal.

    1 Reply Last reply
    0
    • D Offline
      D Offline
      diegosarmentero
      wrote on 9 Jun 2011, 00:36 last edited by
      #3

      Maybe you can take a look at this files:

      http://code.google.com/p/ninja-ide/source/browse/ninja_ide/gui/misc/console_widget.py
      http://code.google.com/p/ninja-ide/source/browse/ninja_ide/tools/console.py

      Using that I wrote a Python Console, maybe you can use something like that and send commands to the OS and print the answer in that QPlainTextEdit.

      You can see at the ConsoleWidget Class how to handle history and avoid to let the user modify everywhere in the QPlainTextEdit, to behave as a console.

      Regards

      Diego Sarmentero
      Blog: http://diegosarmentero.com.ar
      Twitter: http://twitter.com/diegosarmentero

      1 Reply Last reply
      0
      • H Offline
        H Offline
        Houssem BDIOUI
        wrote on 2 Sept 2012, 16:07 last edited by
        #4

        Please take look at this open source project:

        http://sourceforge.net/projects/qconsole

        It's a Qt / C++ console widget, currently supporting TCL and Python languages but it is completely extensible...

        1 Reply Last reply
        0
        • P Offline
          P Offline
          Peppy
          wrote on 2 Sept 2012, 16:15 last edited by
          #5

          I am working on that too, everything you need it's just to handle position of cursor inside of keyPressEvent.

          1 Reply Last reply
          0
          • H Offline
            H Offline
            Houssem BDIOUI
            wrote on 2 Sept 2012, 16:34 last edited by
            #6

            [quote author="Peppy" date="1346602509"]I am working on that too, everything you need it's just to handle position of cursor inside of keyPressEvent.[/quote]

            It's indeed an important part but you quickly realize that more and more features must be added : Just take a look at QConsole code and try it...

            1 Reply Last reply
            0
            • K Offline
              K Offline
              kmatheussen
              wrote on 2 Sept 2012, 17:24 last edited by
              #7

              This one is quite fancy:
              "https://github.com/kmatheussen/radium/blob/master/Qt/Qt_ReqType.cpp":https://github.com/kmatheussen/radium/blob/master/Qt/Qt_ReqType.cpp

              It uses a label to display output text and opens a new QLineEdit widget for each input line.

              1 Reply Last reply
              0
              • P Offline
                P Offline
                Peppy
                wrote on 2 Sept 2012, 18:14 last edited by
                #8

                @Houssem:
                No thanks, it's under GPL, I won't use that due to license infringements.

                1 Reply Last reply
                0
                • H Offline
                  H Offline
                  Houssem BDIOUI
                  wrote on 2 Sept 2012, 18:36 last edited by
                  #9

                  [quote author="Peppy" date="1346609672"]@Houssem:
                  No thanks, it's under GPL, I won't use that due to license infringements.[/quote]

                  I've just changed it to LGPL v2, as Qt licence !
                  Please let me know if this is sufficient or more things need to be done...

                  1 Reply Last reply
                  0
                  • P Offline
                    P Offline
                    Peppy
                    wrote on 2 Sept 2012, 19:36 last edited by
                    #10

                    Sorry man, you are using tcl.h (inside of QTclConsole), what is non-standard library, thus I can't compile it.

                    1 Reply Last reply
                    0
                    • Z Offline
                      Z Offline
                      zester
                      wrote on 6 Sept 2012, 15:39 last edited by
                      #11

                      There is QTermWidget
                      https://github.com/zester/Quantum/tree/master/QTermWidget

                      Here is an example application using it.
                      https://github.com/zester/Quantum/tree/master/QTerminal

                      1 Reply Last reply
                      0

                      • Login

                      • Login or register to search.
                      • First post
                        Last post
                      0
                      • Categories
                      • Recent
                      • Tags
                      • Popular
                      • Users
                      • Groups
                      • Search
                      • Get Qt Extensions
                      • Unsolved