Skip to content

Can I run a Python file in C++ function with PythonQt #213

Answered by usiems
gaosh97 asked this question in Q&A
Discussion options

You must be logged in to vote

Sorry I didn't answer earlier: You can run a Python file with PythonQt, but you don't need PythonQt for that.
You can initialize a normal Python interpreter in your code and tell it to compile and execute your code. PythonQt doesn't make it that much easier to do that. What PythonQt is good at is making your own C++ objects available in Python. What it is very good at is making QObjects (the standard interface object of the Qt framework) available in Python.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by mrbean-bremen
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
question Further information is requested
2 participants
Converted from issue

This discussion was converted from issue #208 on May 07, 2024 14:27.