[Qt-interest] Question regarding QTimer

Vesa Shmuel Peltonen vesashmuel at gmail.com
Wed Mar 16 15:38:45 CET 2011


Hello all,

I've simple question. I'm trying to start a timer when mouse press event is
received on eventfilter:

xxx::eventFilter(QObject *object, QEvent *event)

{

        if ( event->type() == QEvent::MouseButtonPress )

    {

           m_timer->start(150); // msec

...


It seems that the timer timeouts always only after the mouse is
released, even if the mouse press is very long (many seconds).

Is this known behavior and is there way to overcome the problem? Is
the system process blocking the application thread during the mouse
press, so even if the timeout should have happen much earlier, the
slot is called only after the mouse is released?

Btw, my environment is Qt 4.7.2 on *S^3 device*. I've not tested the
behavior on other platforms.


Thanks,

Vesa
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20110316/d0bffe22/attachment.html 


More information about the Qt-interest-old mailing list