Skip to content

Instantly share code, notes, and snippets.

@patmarion
Created September 11, 2015 00:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save patmarion/4bf2905e5f8b3c0b09d2 to your computer and use it in GitHub Desktop.
Save patmarion/4bf2905e5f8b3c0b09d2 to your computer and use it in GitHub Desktop.
#include <Python.h>
#include <PythonQt.h>
#include <PythonQt_QtBindings.h>
int main(int argc, char **argv)
{
PythonQt::init(0);
PythonQt_init_QtBindings();
PythonQtObjectPtr main = PythonQt::self()->getMainModule();
main.evalScript("import PythonQt.QtCore");
main.evalScript("x = PythonQt.QtCore.QFile.ReadOnly");
if (Py_IsInitialized())
{
Py_Finalize();
}
PythonQt::cleanup();
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment