Results 1 to 16 of 16

Thread: Problems with QApplication::processEvents()

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Oct 2007
    Posts
    9
    Thanks
    1

    Default Problems with QApplication::processEvents()

    Hi,

    I am currently working on a project for my diploma.
    My job is it to extend a qt standalone application to something vnc-like client/server application for remote support.
    What I have done so far:
    I have installed an event filter on the client side that catches mouse/user events.
    After serialization the captured event is send with some qwidget information (name, size etc.) over a qtcpsocket to the remote peer.
    There the event is deserialized and the qwidget is identified by the details (doing some search in QApplication::allWidgets). The event is finally posted via QCoreApplication:: postEvent method.
    Everything works as expected so far.

    But now I found that there are two cases in which the above described approach does not seem to work and I cannot figure out what happens:

    When the application is running into a while loop and QApplication:: processEvents is called within this loop or a QDialog is executed (not shown) elsewhere instead, cpu usage becomes 100% after a while and finally the peer application crashes. What seems very strange to me is that the cpu usage increases and the application crashes even if no mouse events are send to the peer (no user / socket interaction in that case, just an open (modal) QDialog...)

    The problem seems to be the call to processEvents as this is used in the exec() method of QDialog, too.

    Can someone give me some hints what might be the problem in this case?

    Thank you in advance.

    Winni
    Last edited by Winni; 2nd January 2008 at 22:12.

Similar Threads

  1. Problems customizing QSlider
    By Antrax in forum Qt Programming
    Replies: 13
    Last Post: 20th December 2011, 07:00
  2. Replies: 2
    Last Post: 8th March 2007, 22:22
  3. Problems using a DLL
    By prosass in forum Newbie
    Replies: 7
    Last Post: 6th March 2007, 17:45
  4. Problems building mysql plugin for Qt 4.1.2 on windows XP
    By Philip_Anselmo in forum Installation and Deployment
    Replies: 3
    Last Post: 17th May 2006, 15:38
  5. QT4 Plugins - problems, problems
    By NormanDunbar in forum Qt Programming
    Replies: 6
    Last Post: 9th May 2006, 15:39

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
  •  
Qt is a trademark of The Qt Company.