python script integration with QT Desktop software
-
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....
-
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....
@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 likecall C++ api from python
gives a range of ways you can achieve this. -
@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 likecall C++ api from python
gives a range of ways you can achieve this.@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 !
-
@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 !
@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
. -
@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
.@JonB I found a good solution: pythonqt
https://github.com/MeVisLab/pythonqt