mirror of
https://github.com/thp/pyotherside.git
synced 2025-01-28 23:52:55 +08:00
3836fdbc3d
This new approach uses conversion of Python objects to Qt objects and vice versa, and introduces some new API such as "call(func, args)" and "addImportPath(path)".
27 lines
412 B
C++
27 lines
412 B
C++
|
|
#include <QApplication>
|
|
#include <QTextStream>
|
|
#include <QDeclarativeView>
|
|
#include <QUrl>
|
|
|
|
#include "qpython.h"
|
|
#include "qpython_test.h"
|
|
|
|
int main(int argc, char **argv)
|
|
{
|
|
QApplication app(argc, argv);
|
|
|
|
qpython_test();
|
|
|
|
QPython::registerQML();
|
|
|
|
QDeclarativeView *view = new QDeclarativeView();
|
|
view->setSource(QUrl("pyotherside.qml"));
|
|
view->show();
|
|
|
|
app.exec();
|
|
|
|
return 0;
|
|
}
|
|
|