mirror of
https://github.com/thp/pyotherside.git
synced 2025-01-17 23:22:53 +08:00
Add test case for GI import issue (Fixes #23)
This commit is contained in:
parent
5c31bde3da
commit
5b76536332
30
tests/test_issue23/issue23.qml
Normal file
30
tests/test_issue23/issue23.qml
Normal file
@ -0,0 +1,30 @@
|
||||
/**
|
||||
* Issue #23: importModule runs forever
|
||||
* https://github.com/thp/pyotherside/issues/23
|
||||
**/
|
||||
|
||||
import QtQuick 2.0
|
||||
import io.thp.pyotherside 1.3
|
||||
|
||||
Rectangle {
|
||||
width: 300
|
||||
height: 300
|
||||
|
||||
Text {
|
||||
id: text
|
||||
anchors.centerIn: parent
|
||||
}
|
||||
|
||||
Python {
|
||||
Component.onCompleted: {
|
||||
importModule('gi.repository.Gio', function() {
|
||||
console.log('import completed');
|
||||
call('gi.repository.Gio.Settings.new("org.gnome.Vino").keys', [], function(result) {
|
||||
text.text = result.join('\n');
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
onError: console.log('Error: ' + traceback);
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user