1
0
mirror of https://github.com/thp/pyotherside.git synced 2025-02-05 08:08:23 +08:00

Add test case for issue #46

This commit is contained in:
Thomas Perl 2015-06-13 21:08:23 +02:00
parent 2378495fa9
commit cf8620502c
5 changed files with 49 additions and 0 deletions

View File

@ -0,0 +1,8 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import pyotherside
class Crasher:
def __init__(self):
pass

View File

@ -0,0 +1,18 @@
import QtQuick 2.1
import QtQuick.Window 2.1
import io.thp.pyotherside 1.5
Window {
visible: true
Python {
id: python
Component.onCompleted: {
addImportPath(Qt.resolvedUrl('.'));
importModule('editor', function () {
call('editor.Crasher', [], function () {
});
});
}
}
}

View File

@ -0,0 +1,6 @@
<!DOCTYPE RCC><RCC version="1.0">
<qresource>
<file>editor.qml</file>
<file>editor.py</file>
</qresource>
</RCC>

View File

@ -0,0 +1,9 @@
#include <QGuiApplication>
#include <QQmlApplicationEngine>
int main(int argc, char *argv[])
{
QGuiApplication app(argc, argv);
QQmlApplicationEngine engine(QUrl("qrc:/editor.qml"));
return app.exec();
}

View File

@ -0,0 +1,8 @@
TEMPLATE = app
TARGET = test_qrc_crash
INCLUDEPATH += .
QT += qml quick
SOURCES += main.cpp
RESOURCES += editor.qrc