Results 1 to 4 of 4

Thread: QTimer and QThread in Qtopia 4.2.0

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,368
    Thanks
    3
    Thanked 5,018 Times in 4,794 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: QTimer and QThread in Qtopia 4.2.0

    Hmm.... Why do you need a separate event loop for networking? Qt4 uses glib event loop itself (if you compile it that way), so you are using a single loop even now. I just don't see the point of separate event loops... Could you explain?

  2. #2
    Join Date
    Dec 2006
    Posts
    11
    Thanks
    1
    Qt products

    Default Re: QTimer and QThread in Qtopia 4.2.0

    The library this application used is based on glib. It need an event loop to keep monitoring network and callback application. In Qtopia, QtopiaApplication::exec() maybe GUI event loop. I'm not sure this could also monitor network.

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

    Default Re: QTimer and QThread in Qtopia 4.2.0

    Qt/Qtopia contains networking classes. I'm sure you can use them instead of the glib dependency. But regardless of that if you use a glib-enabled Qt, the Qt event loop should work within the glib event loop without any special tricks to activate the loop. Just call QApplication::exec() and the loops should cooperate. At least that's how I understand it. There is even an article about it somewhere on Trolltech Labs or Qt Quarterly - you can try to dig it out...

Similar Threads

  1. QTimer and QThread
    By TheKedge in forum Qt Programming
    Replies: 4
    Last Post: 21st September 2006, 14:52
  2. Qthread n QTimer Problem
    By quickNitin in forum Qt Programming
    Replies: 5
    Last Post: 8th June 2006, 14:12
  3. Replies: 6
    Last Post: 17th March 2006, 17:48

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.