Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. Passing values between apps and webserver

Passing values between apps and webserver

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
webservercloud
2 Posts 2 Posters 1.6k 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.
  • P Offline
    P Offline
    Phils
    wrote on 14 Mar 2017, 09:26 last edited by Phils
    #1

    Hi,
    I'm really new in Qt and web server programming.
    How do I really to pass value from my app to cloud service and from cloud service back to client app?
    Do I have to upload my app to the cloud or create a new script say java script in the server to receive and pass values? XMLHTTPRequest? JSON? Is there any example? I've been searching the net high and low but all I found is bit and pieces. I just couldn't get a whole big picture out of it. I can't get the connections between the examples I found:(
    I'm currently using google cloud and created a sql database in it. If I'm required to create an app in the google cloud, what app engine or service do I use?
    I'm using sqlite in my app.

    1 Reply Last reply
    0
    • L Offline
      L Offline
      Lorenz
      wrote on 14 Mar 2017, 14:15 last edited by
      #2

      Hi Phils,

      You are mixing up some things here. Your app is split in two parts:

      • server part (not written in qt, might be provided by a third party or written by you in a server language such as PHP)
      • client app (qt)

      Thus, you won't necessarily need to upload your app to the cloud. However, you might need a webserver if you intend to host your app on your own.

      There are different ways to implement a web service and choosing the correct one depends on your needs. If you only want to store some simple key - value pairs on a server, a mobile backend as a service, such as the WebStorage offered by V-Play could be a solution for you.

      If you need very complex tasks, you might want to implement an API on your own. You might want to have a look at this tutorial.

      No matter what kind of API your application will use, you will most likely talk to it using JSON or XML using XMLHttpRequest.. You can find a small code snippet that shows you how to read and parse JSON from a server using XMLHttpRequest here.

      You can use this snippet to play around with the fake-APIs provided here.

      A very complete example where an API is used is the Qt World Summit 2017 app. Instead of the asset-url used here, also a http:// url could be used.

      Let me know what you would like to do and I can try to give you more guidance.

      Best,
      Lorenz

      Developer @ V-Play Engine - http://v-play.net/qt

      V-Play simplifies

      • Game Development with Qt
      • Mobile App Dev with Qt esp. iOS & Android

      What others say
      V-Play scored #1 in Cross-Platform App Development Tools Report - see why: https://goo.gl/rgp3rq

      1 Reply Last reply
      1

      1/2

      14 Mar 2017, 09:26

      • Login

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