|
Can I run python file in c++ function with PythonQt, my python file like this |
Answered by
usiems
May 6, 2024
Replies: 1 comment
|
Sorry I didn't answer earlier: You can run a Python file with PythonQt, but you don't need PythonQt for that. |
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
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.