Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    XMLPatterns, QCoreApplications and the event loop

    General and Desktop
    3
    3
    1789
    Loading More Posts
    • 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
      jc-denton last edited by

      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 Reply Quote 0
      • M
        mlong last edited by

        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 Reply Quote 0
        • G
          goetz last edited by

          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 Reply Quote 0
          • First post
            Last post