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. Feasibility of Embedding Jupyter-like Python Console in Qt using C++
Forum Update on Monday, May 27th 2025

Feasibility of Embedding Jupyter-like Python Console in Qt using C++

Scheduled Pinned Locked Moved Unsolved General and Desktop
8 Posts 4 Posters 546 Views
  • 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
    farley
    wrote on last edited by
    #1

    Hello Qt Community,

    I've searched on GitHub and found QtConsole, which is a Python implementation using PyQt but does not support C++. I'm exploring the feasibility of embedding a Jupyter-like Python console in my Qt application using C++. Is this idea feasible given this context, and if so, are there any resources or advice you can provide?

    Thank you!
    farley

    Pl45m4P 1 Reply Last reply
    0
    • F farley

      Hello Qt Community,

      I've searched on GitHub and found QtConsole, which is a Python implementation using PyQt but does not support C++. I'm exploring the feasibility of embedding a Jupyter-like Python console in my Qt application using C++. Is this idea feasible given this context, and if so, are there any resources or advice you can provide?

      Thank you!
      farley

      Pl45m4P Online
      Pl45m4P Online
      Pl45m4
      wrote on last edited by Pl45m4
      #2

      @farley

      Any I/O-TextWidget in Qt can be a Python console, if you pass the input to some underlaying QProcess and call the python interpreter in the background.
      (Hard to show graphics in there, I guess)

      But why?


      If debugging is the process of removing software bugs, then programming must be the process of putting them in.

      ~E. W. Dijkstra

      F 1 Reply Last reply
      0
      • SGaistS Offline
        SGaistS Offline
        SGaist
        Lifetime Qt Champion
        wrote on last edited by
        #3

        Hi,

        Something is not clear for me in your question. Do you want to have a terminal in your application or do you want to be able to run Jupyter as done with QtConsole ?

        Interested in AI ? www.idiap.ch
        Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

        1 Reply Last reply
        0
        • Pl45m4P Pl45m4

          @farley

          Any I/O-TextWidget in Qt can be a Python console, if you pass the input to some underlaying QProcess and call the python interpreter in the background.
          (Hard to show graphics in there, I guess)

          But why?

          F Offline
          F Offline
          farley
          wrote on last edited by
          #4

          @Pl45m4 @SGaist thanks for your reply. i am not very clear on this idea. i just want to embed a python console in my application. terminal is too simple than jupyter. on the other hand, there is not a jupyter like console in github using qwidget, i don’t know if it’s a good idea to implement it such as named QJupyterWidget to replace the standard terminal for better appearance and better outputs when embedded into a application?

          artwawA 1 Reply Last reply
          0
          • F farley

            @Pl45m4 @SGaist thanks for your reply. i am not very clear on this idea. i just want to embed a python console in my application. terminal is too simple than jupyter. on the other hand, there is not a jupyter like console in github using qwidget, i don’t know if it’s a good idea to implement it such as named QJupyterWidget to replace the standard terminal for better appearance and better outputs when embedded into a application?

            artwawA Offline
            artwawA Offline
            artwaw
            wrote on last edited by
            #5

            @farley Then as @Pl45m4 said - any text widget will do. You run input though the QProcess, pass the stdout (and possible stderr, depending on your use case) to the widget and done.

            For more information please re-read.

            Kind Regards,
            Artur

            F 1 Reply Last reply
            0
            • artwawA artwaw

              @farley Then as @Pl45m4 said - any text widget will do. You run input though the QProcess, pass the stdout (and possible stderr, depending on your use case) to the widget and done.

              F Offline
              F Offline
              farley
              wrote on last edited by
              #6

              @artwaw how about supporting image and video which is supported in jupyter

              artwawA 1 Reply Last reply
              0
              • F farley

                @artwaw how about supporting image and video which is supported in jupyter

                artwawA Offline
                artwawA Offline
                artwaw
                wrote on last edited by
                #7

                @farley From the top of my head I'd say you can arrange such output by usign QGraphicsView with a mixture of elements in it? Text, Pixmap, Video.

                For more information please re-read.

                Kind Regards,
                Artur

                1 Reply Last reply
                0
                • SGaistS Offline
                  SGaistS Offline
                  SGaist
                  Lifetime Qt Champion
                  wrote on last edited by
                  #8

                  You might want to check the Serial port terminal example.

                  Depending on what you want to achieve Kate's terminal(article discussing having it on Windows as well) using Konsole might be another possibility. But all in all, you really need to define what you want to do as depending on that you will either ensure your user has python installed or you'll have python built into your application.

                  Interested in AI ? www.idiap.ch
                  Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                  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