Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. XMLPatterns, QCoreApplications and the event loop
QtWS25 Last Chance

XMLPatterns, QCoreApplications and the event loop

Scheduled Pinned Locked Moved General and Desktop
3 Posts 3 Posters 1.9k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • J Offline
    J Offline
    jc-denton
    wrote on last edited by
    #1

    I want to use just the Qt XML library with the DOM parser and the QtXMLPatterns library to process XQueries, no gui. Looking at the source of the xmlpatterns utility it just instantiates QCoreApplication. My question now: Why do I need to instantiate QCoreApplication and what about event processing. QXMLPatterns also depends on QtNetwork, which makes sense since one can access remote resources form XQueries. This however raises the question weather any events need to be processed? When I'm done with XML processing I just call app.exit(), where app is the instance of QCoreApplication.

    1 Reply Last reply
    0
    • M Offline
      M Offline
      mlong
      wrote on last edited by
      #2

      I can't speak authoritatively about your particular question about QtXMLPatterns and such, but it is worth noting that QCoreApplication does set up some other things behind the scenes and provides some foundation to Qt beyond just the main event loop.

      To what extent the QtXML stuff uses these things, I'm not sure without looking at the source code.

      Software Engineer
      My views and opinions do not necessarily reflect those of anyone -- living or dead, real or fictional -- in this universe or any other similar multiverse node. Void where prohibited. Your mileage may vary. Caveat emptor.

      1 Reply Last reply
      0
      • G Offline
        G Offline
        goetz
        wrote on last edited by
        #3

        In case the XML part needs to utilize the network for downloading some missing parts, it needs an event loop running - that's provided by QCoreApplication.

        http://www.catb.org/~esr/faqs/smart-questions.html

        1 Reply Last reply
        0

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved