Best way to add python scripts to a QT application?

I have a QT 4.6 application (C ++ language) and I need to add python scripts to it on a Windows platform. Unfortunately, I have never added python before, and there seem to be many different ways to do this. Can someone share their wisdom and point me to some articles / documentation that I can read to accomplish a given task in a less painful way?

+5
source share
2 answers

Edit:

You can use PythonQt (not PyQt), which allows you to use Python with Qt. I think this is what you are looking for.

Here is the documentation on the official website: http://doc.qt.digia.com/qq/qq23-pythonqt.html .

+5
source

You should take a look at PythonQt . On the home page:

PythonQt is a dynamic Python binding for Qt . This offers an easy way to embed a Python scripting language in Qt Applications. It makes extensive use of QMetaObject systems and thus requires Qt4.x. Unlike PyQt, PythonQt is not a full Python wrapper around full Qt functionality. So if you are looking to write a complete Python application using the Qt GUI, you should use PyQt.

If you are looking for an easy way to embed Python objects in your C ++ / Qt. Application and script parts of your application through Python, PythonQt is the way to go!

Assembly / installation instructions for Windows are at the bottom of the page.

+5
source

Source: https://habr.com/ru/post/970970/


All Articles