Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8269367
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T06:12:08+00:00 2026-06-08T06:12:08+00:00

I need to create a simple web service (being the server). The goal is

  • 0

I need to create a simple web service (being the “server”). The goal is to provide some data I do read in an Qt / C++ application as JSON data. Basically a JavaScript application in the browser shall read its data from the Qt app. It is usually a single user scenario, so the user runs a Google Maps application in her browser, while additional data come from the Qt application.

So far I have found these libs:

  1. Qxt: http://libqxt.bitbucket.org/doc/0.6/index.html but being a newbie on C++/Qt I miss some examples. Added: I have found one example here
  2. gSoap: http://www.cs.fsu.edu/~engelen/soap.html has more examples and documentation and also seems to support JSON
  3. KD SOAP: http://www.kdab.com/kdab-products/kd-soap/ with no example as far as I can tell, docu is here
  4. Qt features itself, but it is more about acting as a client: http://qt-project.org/videos/watch/qt-networking-web-services

Checking SO gives me basically links to the above libs

  1. webservice with Qt with an example I do not really get.
  2. How to Create a webservice by Qt

So basically I do have the following questions:

  1. Which lib would you use? I want to keep it as simple as possible and would need an example.
  2. Is there another (easy!) way to provide the JSON data to the JavaScript Web page besides the WebService?

— Edit, remarks: —

Needs to be application intrinsic. No web server can be installed, no extra run time can be used. The user just runs the app. Maybe the Qt WebKit could be an approach….

— Edit 2 —

Currently checking the tiny web servers as of SO ” Qt HTTP Server? “

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-08T06:12:10+00:00Added an answer on June 8, 2026 at 6:12 am

    As of my tests, currently I am using QtWebApp: http://stefanfrings.de/qtwebapp/index-en.html This is one of the answers of Edit 2 ( Qt HTTP Server? )

    Stefan’s small WebServer has some well documented code, is written in “Qt C++” and easy to use, especially if you have worked with servlets already. Since it can be easily integrated in my Qt project, I’ll end up with an internal WebServer.

    Some demo code from my JSON tests, showing that generating the JSON content is basically creating a QString.

    void WebServiceController::service(HttpRequest& request, HttpResponse& response) {
    // set some headers
    response.setHeader("Content-Type", "application/json; charset=ISO-8859-1");
    response.setCookie(HttpCookie("wsTest","CreateDummyPerson",600));
    
    QString dp = WebServiceController::getDummyPerson();
    QByteArray ba = dp.toLocal8Bit();
    const char *baChar = ba.data();
    response.write(ba);
    }
    

    If someone has easy examples with other libs to share, please let me know.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I need to create a web service to collect data from my customer’s applications.
I'm attempting to create a DataGrid with some data retrieved from a Web Service.
I need to create a simple application that would generate reports based on database
I need to create some simple effects for the layers which I have created
Sometimes you need to create a very simple single file application in Qt4. However
How to create simple PHP COMET server page displaying current time? I need code
I have a JSON response from a web service that I need to be
I need to create a simple website, the server is gonna running on Amazon
I'm trying to create a simple AJAX & web service test (using C# .Net
I need to provide (to myself) a way to grab some data from the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.