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. python script integration with QT Desktop software
Forum Updated to NodeBB v4.3 + New Features

python script integration with QT Desktop software

Scheduled Pinned Locked Moved Unsolved General and Desktop
5 Posts 2 Posters 74 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.
  • S Offline
    S Offline
    shusong Peng
    wrote last edited by
    #1

    How to integrate python script program to a QT developed Desktop machine control software, and can realize that python script program run the API of the QT developed software? for example: running the python script program(inside it, there are some sentences contain API functions of QT developed software ), and it can control the machine to start or stop or set something....

    JonBJ 1 Reply Last reply
    0
    • S shusong Peng

      How to integrate python script program to a QT developed Desktop machine control software, and can realize that python script program run the API of the QT developed software? for example: running the python script program(inside it, there are some sentences contain API functions of QT developed software ), and it can control the machine to start or stop or set something....

      JonBJ Offline
      JonBJ Offline
      JonB
      wrote last edited by
      #2

      @shusong-Peng
      If the "QT developed Desktop machine control software" is itself written in Python with PySide or PyQt bindings for Qt then you can call exported Python functions in it directly.

      If it is written in C++, presumably as a "shared library" (.dll or .so file) then you can call its public functions via appropriate bindings from Python to C++ as would be the case for any C++ functions regardless of Qt. Googling something like call C++ api from python gives a range of ways you can achieve this.

      S 1 Reply Last reply
      0
      • JonBJ JonB

        @shusong-Peng
        If the "QT developed Desktop machine control software" is itself written in Python with PySide or PyQt bindings for Qt then you can call exported Python functions in it directly.

        If it is written in C++, presumably as a "shared library" (.dll or .so file) then you can call its public functions via appropriate bindings from Python to C++ as would be the case for any C++ functions regardless of Qt. Googling something like call C++ api from python gives a range of ways you can achieve this.

        S Offline
        S Offline
        shusong Peng
        wrote last edited by
        #3

        @JonB It is written by C++, and it is an independent desktop software when we use it. in some cases, automatically control the machine, our customer want us using python script to write some special control sequence, and this special control sequence can work with the software we developed by QT C++ to control the machine. That is our detail requirements, do you have any experience about this kind of cases? thanks very much !

        JonBJ 1 Reply Last reply
        0
        • S shusong Peng

          @JonB It is written by C++, and it is an independent desktop software when we use it. in some cases, automatically control the machine, our customer want us using python script to write some special control sequence, and this special control sequence can work with the software we developed by QT C++ to control the machine. That is our detail requirements, do you have any experience about this kind of cases? thanks very much !

          JonBJ Offline
          JonBJ Offline
          JonB
          wrote last edited by
          #4

          @shusong-Peng
          I do not have personal experience of calling C++ from Python. However it is obviously a very common thing, as many libraries are written in C++ and callable from Python. I suggested starting from Googling for, say, call C++ api from python.

          S 1 Reply Last reply
          0
          • JonBJ JonB

            @shusong-Peng
            I do not have personal experience of calling C++ from Python. However it is obviously a very common thing, as many libraries are written in C++ and callable from Python. I suggested starting from Googling for, say, call C++ api from python.

            S Offline
            S Offline
            shusong Peng
            wrote last edited by
            #5

            @JonB I found a good solution: pythonqt
            https://github.com/MeVisLab/pythonqt

            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