mirror of
https://github.com/thp/pyotherside.git
synced 2025-01-17 23:22:53 +08:00
2a79458c68
Also update examples to use the new feature.
20 lines
407 B
QML
20 lines
407 B
QML
import QtQuick 2.0
|
|
import io.thp.pyotherside 1.0
|
|
|
|
Rectangle {
|
|
width: 200
|
|
height: 200
|
|
color: 'red'
|
|
|
|
Python {
|
|
Component.onCompleted: {
|
|
// Add the directory of this .qml file to the search path
|
|
addImportPath(Qt.resolvedUrl('.'));
|
|
|
|
importModule_sync('atexit_example');
|
|
}
|
|
|
|
onError: console.log('error in python: ' + traceback);
|
|
}
|
|
}
|