User Tools

Site Tools


timer

Timer (QObject)

The Qt documentation in C++ of this class can be read here: http://doc.trolltech.com/4.3/qobject.html

Most important

Methods IsRunning , Start , Stop
Properties Interval , Enabled
Events OnEvent

Please read the control class overview Control as well.

A form control may use as many timer controls as you desire. Be aware that the form control comes with a built-in timer. See TimerInterval for more details.

To make your application perform idle processing (i.e. executing a special function whenever there are no pending events), use a Timer with an Interval set to -1.

METHODS

IsRunning

Function IsRunning() As Boolean


Start

Sub Start()


Stop

Sub Stop()


PROPERTIES

Interval

Property Interval As Integer (ReadWrite)

A timer with a interval of 0 will time out as soon as all the events in the window system's event queue have been processed.


Enabled

ReadWrite Enabled As Boolean

If you it is set True, the timer event will start automatically after opening the form. Do not forget to set Interval of the timer.

If you would like to manually start the timer set Enabled=False and use Start and Stop to manage the timer. Do not forget to set Interval of the timer.


EventOnOpen

ReadOnly EventOnOpen As Boolean

If you it is set True, the timer event will start automatically after opening the form, but not waiting for the interval to raise the first OnEvent. It is done after OnOpen. Do not forget to set Interval of the timer.


EVENTS

OnEvent

Sub OnEvent()

This event is raised, whenever the timer interval is reached.


timer.txt · Last modified: 2013/06/04 13:56 by berndnoetscher