Results 1 to 2 of 2

Thread: Application freezes for 0.5 sec after keyPressEvent

  1. #1
    Join Date
    Jul 2010
    Posts
    7
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Application freezes for 0.5 sec after keyPressEvent

    My application works well on:
    • Fedora 14 Linux with Qt 4.7.1
    • Windows Vista with Qt 4.7.0
    • MacOS with probably also Qt 4.7.x


    However, on a Debian Linux system with Qt 4.6.3 I have a strange problem:
    The application freezes for about 0.5 seconds after each QWidget::keyPressEvent. Its an 3D graphics application so I have an QTimer that fires a method mainloop every few milliseconds in order to move a camera smoothly. After the keyPressEvent was processed the QTimer fires one or two more times, but then freezes for 0.5 sec. I can "prevent" this problem by moving the mouse the whole time.

    It can't easily update to Qt 4.7.x on that system, since I have no root access. However, I could supply Qt 4.7.1 libraries with the application binary. I will try that tomorrow *).

    Has anyone similar problems or an idea what could cause this? I searched the bug tracker, but found no related bug that was fixed with Qt 4.7. Maybe it has nothing at all to do with the Qt version.

    Best regards,
    Coolcat

    *) I'm in UTC+2 timezone
    Beware of bugs in the above code; I have only proved it correct, not tried it. (Donald Knuth)

  2. #2
    Join Date
    Jul 2010
    Posts
    7
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: Application freezes for 0.5 sec after keyPressEvent

    Ok, it is indeed a problem in Qt 4.6.3 only. Using Qt 4.7.1+ it works fine.
    Beware of bugs in the above code; I have only proved it correct, not tried it. (Donald Knuth)

Similar Threads

  1. QGraphicsScene with scaled item freezes application on click
    By FlashMuller in forum Qt Programming
    Replies: 2
    Last Post: 31st January 2011, 14:51
  2. GUI freezes in loop: Thread does not help?
    By Matty23 in forum Qt Programming
    Replies: 4
    Last Post: 25th November 2010, 22:04
  3. Keyboards freezes
    By giusepped in forum Qt-based Software
    Replies: 0
    Last Post: 28th October 2008, 02:30
  4. application freezes without crashing (and closing)
    By nass in forum Qt Programming
    Replies: 15
    Last Post: 25th September 2007, 12:21
  5. My SDI application freezes when it is inactive ...why ?
    By yellowmat in forum Qt Programming
    Replies: 1
    Last Post: 5th September 2006, 17:37

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.