##// END OF EJS Templates
Fix PythonQt*Config*.cmake
Fix PythonQt*Config*.cmake

File last commit:

r205:706df4355685
r212:00d0962ac01d
Show More
main.cpp
36 lines | 827 B | text/x-c | CppLexer
Orochimarufan
Redo CMake build system, get Qt5 support...
r205 /*! \file examples/NicePyConsole/main.cpp
* \brief shows how to create a small nice python console
* \author "Melven Zoellner" <melven@topen.org>
*
*/
// Qt-includes
#include <QApplication>
// PythonQt-includes
#include <PythonQt.h>
#include <PythonQt_QtAll.h>
// includes
#include "NicePyConsole.h"
// the main function
int main(int argc, char **argv)
{
// create the Qt-application-object
QApplication qapp(argc, argv);
// initialize PythonQt
PythonQt::init(PythonQt::IgnoreSiteModule | PythonQt::RedirectStdOut);
PythonQt_QtAll::init();
// get the python-context and create the console widget
PythonQtObjectPtr mainContext = PythonQt::self()->getMainModule();
NicePyConsole console(NULL, mainContext);
// just show the console...
console.show();
return qapp.exec();
}