Results 1 to 6 of 6

Thread: Synchronous Http (Good reason)

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Apr 2008
    Posts
    3
    Qt products
    Qt4
    Platforms
    Windows
    Thanks
    1

    Default Re: Synchronous Http (Good reason)

    It's not better. It's almost the same, just that any optimizations to the loop performed by QEventLoop (if there are any) are not used by your code.[/QUOTE]

    So how exactly does this work, doesn't another executing QEventLoop block the main QT event loop? Or QT manages to jump from executing one loop to another?

    Thanks.

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,376
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Thanks
    4
    Thanked 5,019 Times in 4,795 Posts
    Wiki edits
    10

    Default Re: Synchronous Http (Good reason)

    Quote Originally Posted by umbrella View Post
    So how exactly does this work, doesn't another executing QEventLoop block the main QT event loop?
    It does. That's the whole point.

    Or QT manages to jump from executing one loop to another?
    Look at how modal dialogs (ones triggered using QDialog::exec()) work - they use the same mechanism, they have an internal event loop.

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.