Details
-
Suggestion
-
Resolution: Unresolved
-
P2: Important
-
None
-
5.5.1
Description
While there are workarounds, none are as ideal as supporting the properties directly:
hxr.timeout = 1000; //ms hxr.ontimeout = function(){ hxr.abort(); // No root needed, timer is cleaned up at the same time as XHR object.
Work-around :
//Sub optimal: // 1. I need a "root" object, // 2. I need to cleanup the dynamically allocated timer. var timer = Qt.createQmlObject("import QtQuick 2.3; Timer {interval: 1000; repeat: false; running: true;}",root,"MyTimer"); timer.triggered.connect(function(){ hxr.abort(); });