Qt World Summit: Submit your Presentation

Building a reusable library, that has no graphical interface, in QML, that has to make HTTP requests

  • I'm attempting to build a Qt Quick project that is not an application, but a library (in C++, I would be building a statically-linked library), and I would like this library to be able to make HTTP requests, but I'm not sure how to go about doing this. My concerns are:

    • I'm not sure how to build/run a QML app without an interface. All the examples I've looked at seem to require me to have a graphical interface of some description (a Rectangle for instance), and hiding the interface still cases it to show up in the task bar.
    • If I can't have a Qt Quick app without an interface, then I'll need to make it a pure JavaScript library, but the loss of the XMLHttpRequest make life more difficult.

    I'm new to QML development, but not to Qt's C++ modules, and I'm not finding a lot of helpful information. Can anyone help me with this issue, and point me to some documentation that would help?

  • Moderators

    I don't quite get the point why are you trying to do this. Why do you need QML for this? C++ is more than well suited for that use case. Or maybe you just want the QML syntax (in that case, take a look at QBS project to see how to create custom QML languages)?

  • Ah, sorry for not being clear about my intentions. I'm trying to build an app using Ubuntu's new QML-based SDK, which has developers building app in pure QML. An example can be found "here":http://developer.ubuntu.com/resources/app-developer-cookbook/mobile/currency-converter-phone-app/. I'd like to build an app that interfaces with a third-party API, and I'd like to build that particular piece of functionality into a separate library.

Log in to reply