QtWebApp (lib)


Source (link to git-repo or to original if based on someone elses unmodified work): Add the source-code for this project on opencode.net

Score 50.0%

QtWebApp is a library that supports you in developing web server applications. It contains four modules that can be used independently of each other:

The multi-threaded HTTP(S) 1.1 Server decodes incoming HTTP requests and passes them to you custom request handler, which produces the HTTP response. It supports HTTPS, cookies, sessions and file-uploads.

The Template Engine text based documents (e.g. HTML, XML, JSON) by replacing placeholders with variable data. It can display or hide parts conditionally and repeat sections to output lists and tables. There is also support for i18n.

The Logger writes messages to files. It creates new files after a certain size and keeps a number of backups. The logger can hold back debug messages in a buffer as long no problem occurs but write them into the file if an error occurs. All logger settings become effective at runtime without program restart.

The package includes also a copy of Nokias qtservice helper library, which turns your program into a real Windows Service.

You can simply copy the source codes of QtWebApp into your project or use it as a shared library.

The API is similar to Java servlets. Example:

void MyController::service(HttpRequest& request, HttpResponse& response) {

// Get some request parameters
QByteArray path=request.getPath();
QByteArray username=request.getParameter("username");

// set some headers
response.setHeader("Content-Type", "text/plain; charset=ISO-8859-1");

// generate response
response.write("Hello ");

int main(int argc, char *argv[]) {

QCoreApplication* app=new QCoreApplication(argc,argv);
QSettings* settings=new QSettings("etc/configfile.ini",QSettings::IniFormat,app);
MyController* controller=new MyController(app);
HttpListener* listener=new HttpListener(settings,controller,app);

return app->exec();

Be the first to comment
product-maker Count: 4 Rating: 5.0
File (click to download) Version Description PackagetypeArchitectureRelease Channel Downloads Date Filesize DL OCS-Install
*Needs ocs-url or ocs-store to install things
updated Jun 06 2016
added Jul 23 2012
downloads 24h
page views 24h 3
System Tags app software