Debian Codegraph @

tests/test_issue23/issue23.qml

raw
1 /**
2 * Issue #23: importModule runs forever
3 * https://github.com/thp/pyotherside/issues/23
4 **/
5
6 import QtQuick 2.0
7 import io.thp.pyotherside 1.3
8
9 Rectangle {
10 width: 300
11 height: 300
12
13 Text {
14 id: text
15 anchors.centerIn: parent
16 }
17
18 Python {
19 Component.onCompleted: {
20 importModule('gi.repository.Gio', function() {
21 console.log('import completed');
22 call('gi.repository.Gio.Settings.new("org.gnome.Vino").keys', [], function(result) {
23 text.text = result.join('\n');
24 });
25 });
26 }
27
28 onError: console.log('Error: ' + traceback);
29 }
30 }