source: trunk/doc/src/snippets/qtscript/scriptedslot/object.js@ 5

Last change on this file since 5 was 2, checked in by Dmitry A. Kuminov, 16 years ago

Initially imported qt-all-opensource-src-4.5.1 from Trolltech.

File size: 325 bytes
Line 
1function Object(timer, editor)
2{
3 this.editor = editor;
4 this.counter = 0;
5 timer.timeout.connect(notify);
6 timer.timeout.connect(this, this.addLine);
7}
8
9Object.prototype.addLine = function()
10{
11 this.editor.append(this.counter);
12 this.counter += 1;
13}
14
15function notify()
16{
17 print("timeout() received");
18}
Note: See TracBrowser for help on using the repository browser.