Py_Initialize(); PyRun_SimpleString("from PyQt4 import QtCore, QtGui"); if ( PyErr_Occurred() ) PyErr_Print(); Py_Finalize();