Results 1 to 2 of 2

Thread: QT event loop

  1. #1

    Default QT event loop

    Hi,
    I am trying to understand how the event processing occurs in QT. So, when you start up your application you have one thread right? And then you run the QApplication.exec() and it enters the event handling loop. My question is where the events come from. Presumably the OS sends them but is there another thread listening for these event to put them into the event queue?
    Thanks,

  2. #2
    Join Date
    Sep 2009
    Location
    UK
    Posts
    2,447
    Thanks
    6
    Thanked 348 Times in 333 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: QT event loop

    They come from the OS or your code.

    No, there isn't another thread listening for events from the OS, as the OS expects each application to have an event loop also and works by sending the application "messages" which the application must check for and process.

    Even if you didn't use Qt, you would still have to have an event loop.

Similar Threads

  1. Event loop
    By jefs in forum Qt Programming
    Replies: 2
    Last Post: 2nd January 2011, 17:51
  2. Replies: 10
    Last Post: 15th January 2010, 14:35
  3. QProcess wo event loop
    By brazso in forum Qt Programming
    Replies: 2
    Last Post: 9th March 2009, 08:57
  4. Event Loop
    By node_ex in forum Qt Programming
    Replies: 1
    Last Post: 12th December 2008, 07:52
  5. Replies: 0
    Last Post: 23rd October 2008, 12:43

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.