File: example_api12.qml

package info (click to toggle)
pyotherside 1.6.2-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 880 kB
  • sloc: cpp: 2,869; python: 475; makefile: 152; sh: 35
file content (23 lines) | stat: -rw-r--r-- 1,005 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
import QtQuick 2.0
import io.thp.pyotherside 1.2

Python {
    Component.onCompleted: {
        addImportPath(Qt.resolvedUrl('.'));
        importModule('thp_io.pyotherside.nested', function () {
            console.log('"nested" imported successfully');
            console.log('repr of the module: ' + evaluate('repr(thp_io.pyotherside.nested)'));
            call('thp_io.pyotherside.nested.info', [], function (result) {
                console.log('from nested.info(): ' + result);
            });
            importModule('thp_io.pyotherside.nested.module', function () {
                console.log('"nested.module" imported successfully');
                call('thp_io.pyotherside.nested.module.info', [], function (result) {
                    console.log('from nested.module.info(): ' + result);
                    console.log('nested.module.value: ' + evaluate('thp_io.pyotherside.nested.module.value'));
                    Qt.quit();
                });
            });
        });
    }
}