User:Vaibhavkaushal123/sandbox

Qt ( "cute", or unofficially as Q-T cue-tee ) is a cross-platform application framework that is widely used for developing application software with a graphical user interface (GUI) (in which cases Qt is classified as a widget toolkit), and also used for developing non-GUI programs such as command-line tools and consoles for servers. Qt is most notably used in Autodesk Maya, The Foundry's Nuke, Adobe Photoshop Elements, OPIE, Skype, VLC media player, VirtualBox, and Mathematica, and by the European Space Agency, DreamWorks,  Google, HP, KDE, Lucasfilm, Panasonic, Philips, Samsung, Siemens, Volvo, and Walt Disney Animation Studios. Research In Motion,

Qt is developed by an open source project, the Qt Project, involving both individual developers as well as developers from Nokia, Digia, and other companies interested in the development of Qt. Prior to the launch of the Qt Project, it was produced by Nokia's Qt Development Frameworks division, which came into being after Nokia's acquisition of the Norwegian company Trolltech, the original producer of Qt. Nokia announced that it is going to drop Symbian technologies and base their future smartphones on Microsoft platform instead in February 2011. One month later Nokia announced the sale of Qt's commercial licensing and professional services to Digia PLC, although Nokia will remain the main development force behind the framework. On May 9, it was announced on the Qt Labs website that the groundwork was being laid for the next major version of Qt, with the expectation that Qt 5 would be released in 2012.

Qt uses standard C++ but makes extensive use of a special code generator (called the Meta Object Compiler, or moc) together with several macros to enrich the language. Qt can also be used in several other programming languages via language bindings. It runs on the major desktop platforms and some of the mobile platforms. It has extensive internationalization support. Non-GUI features include SQL database access, XML parsing, thread management, network support, and a unified cross-platform API for file handling.

Distributed under the terms of the GNU Lesser General Public License (among others), Qt is free and open source software. All editions support a wide range of compilers, including the GCC C++ compiler and the Visual Studio suite.

Platforms
Qt works on the following platforms:
 * Windows – Qt for Microsoft Windows
 * Windows CE / Mobile  – Qt for Windows CE/Windows Mobile
 * Symbian – Qt for the Symbian platform.        Qt is to replace Nokia's Avkon as the supported UI SDK for the development of Symbian applications. The Qt for Symbian development group has many quality-controlled articles available.
 * Mac OS X – Qt for Apple Mac OS X. Support for applications on top of Cocoa APIs
 * X11 – Qt for X Window System (GNU/Linux, FreeBSD, HP-UX, Solaris, AIX, etc.)
 * Embedded Linux – Qt for embedded platforms (PDA, Smartphone, etc.)
 * Maemo/MeeGo – Qt for Maemo, merged with Moblin to MeeGo. There are many applications already written for Maemo based on the previous Internet tablets. The Nokia N900 also supports Qt. The Forum Nokia Wiki has quality-controlled articles that support Qt development. The Maemo operating system has a development group on the Forum Nokia Wiki at Forum Nokia Wiki Maemo.
 * Wayland – Qt for Wayland display server. Qt applications can switch between graphical backends like X and Wayland at run time with the -platform command line option.

External ports
Since Nokia opened the Qt source code to the community on Gitorious various ports have been appearing. Here are some of them:
 * Qt for OpenSolaris – Qt for OpenSolaris
 * Qt for Haiku – Qt for Haiku
 * Qt for OS/2 – Qt for OS/2 eCS platform.
 * Qt for Amiga OS4 – Qt for Amiga OS4
 * Qt-iPhone – Experimental development of Qt for iPhone.
 * Qt for webOS – Experimental development of Qt for webOS on Palm Pre.
 * Qt for Amazon Kindle DX – Experimental development of Qt for Amazon Kindle DX.
 * Necessitas – Qt for Android
 * Qt for BlackBerry – Qt for BlackBerry.

Editions
There are three editions of Qt available on each of these platforms, namely:
 * GUI Framework – commercial entry level GUI edition, stripped of network and database support (formerly known as "Desktop Light")
 * Full Framework – complete commercial edition
 * Open Source – complete Open Source edition

Qt is available under the following copyright licenses:


 * GNU LGPL 2.1 Version with Qt special exception
 * GNU GPL 3.0 Version
 * Commercial Developer License

Current
Trolltech released Qt 4.0 on June 28, 2005 and introduced five new technologies in the framework:


 * Tulip A set of template container classes.
 * Interview A model/view architecture for item views.
 * Arthur A 2D painting framework.
 * Scribe A Unicode text renderer with a public API for performing low-level text layout.
 * MainWindow A modern action-based main window, toolbar, menu, and docking architecture.

Next
The next major version of Qt will be Qt 5. It is expected to be released in 2012. This new version will mark a major change of paradigm in the platform, with hardware-accelerated graphics, QML and Javascript playing a major role. C++ Widgets continue to be supported but they are no longer a central part of the platform. Qt5 should be an improvement in term of performance and rapid development.

At the same time the framework has moved to open governance with ongoing development of Qt 5 being done at qt-project.org. It is now possible to submit and review patch for developers outside Nokia.

Design
The innovation of Qt when it was first released relied on a few key concepts.

Modules

 * Modules for general software development
 * The QtCore module contains the core non-GUI classes, including the event loop and Qt's signal and slot mechanism. It also includes platform independent abstractions for Unicode, threads, mapped files, shared memory, regular expressions, and user and application settings.
 * The QtGui module contains the majority of the GUI classes. These include a number of table, tree and list classes based on the model-view-controller design pattern. Also provided is a sophisticated 2D canvas widget capable of storing thousands of items including ordinary widgets.
 * The QtMultimedia module implements low-level multimedia functionality.
 * The QtNetwork module contains classes for writing UDP and TCP clients and servers. It includes classes that implement FTP and HTTP clients and support DNS lookups. Network events are integrated with the event loop making it very easy to develop networked applications.
 * The QtOpenGL module contains classes that enable the use of OpenGL in rendering 3D graphics.
 * The QtOpenVG module is a plugin that provides support for OpenVG painting.
 * The QtScript module is an ECMAScript-based scripting engine
 * The QtScriptTools module provides additional components for applications that use QtScript.
 * The QtSql module contains classes that integrate with open-source and proprietary SQL databases. It includes editable data models for database tables that can be used with GUI classes. It also includes an implementation of SQLite.
 * The QtSvg module contains classes for displaying the contents of SVG files. It supports the static features of SVG 1.2 Tiny.
 * The QtWebKit module provides a WebKit-based layout engine as well as classes to render and interact with web content.
 * The QtXml module implements SAX and DOM interfaces to Qt's XML parser.
 * The QtXmlPatterns module provides support for XPath, XQuery, XSLT and XML Schema validation.
 * The Phonon multimedia API provides simple multimedia control.
 * The Qt3Support module provides classes that ease porting from Qt 3 to Qt 4.
 * The Qt Declarative module is a declarative framework for building fluid user interfaces in QML


 * Modules for working with Qt's tools
 * QtDesigner
 * QtUiTools
 * QtHelp
 * QtTest


 * Modules for Unix developers
 * The QtDBus module is a library that you can use to perform Inter-Process Communication using the D-Bus protocol.


 * Modules for Windows developers
 * The QAxContainer module is an extension for accessing ActiveX controls and COM objects.
 * The QAxServer module is a static library that you can use to turn a standard Qt binary into a COM server.

Use of native UI-rendering APIs
Qt used to emulate the native look of its intended platforms, which occasionally led to slight discrepancies where that emulation was imperfect. Recent versions of Qt use the native style APIs of the different platforms to query the platform for the desired appearance of the Qt controls, and so do not suffer from such issues as much.

One should note that on some platforms (such as MeeGo and KDE) Qt is the native API.

Metaobject compiler
The metaobject compiler, termed moc, is a tool that is run on the sources of a Qt program. It interprets certain macros from the C++ code as annotations, and uses them to generate additional C++ code with "Meta Information" about the classes used in the program. This meta information is used by Qt to provide programming features not available natively in C++: the signal/slot system, introspection and asynchronous function calls.

QtScript ECMAScript interpreter
QtScript is a cross-platform toolkit that allows developers to make their Qt/C++ applications scriptable using an interpreted scripting language: Qt Script (based on ECMAScript/JavaScript).

From Qt 4.3.0 onward, the scripting API, which is based on QSA, is integrated as a core part of Qt and is no longer a separate library.

Bindings
As shown in the table below, Qt has a range of bindings for various languages that implement some or all of its feature set.

Compiling and executing Qt hello world program
1. Create a folder named Hello (or any other name)

2. Copy and paste the above program as file Hello.cpp in directory Hello

3. With Hello as the current directory, run a. qmake -project b. qmake Hello.pro (or whatever the file is named) c. make/gmake/nmake – as needed by OS and compiler environment 4. Execute ./Hello (Or release\Hello.exe in Windows)

Tools

 * Qt Creator, a cross-platform IDE for C++ and QML
 * qmake, a tool that automates the generation of Makefiles for development project across different platforms
 * Qt Designer
 * Qt Assistant
 * Qt Linguist
 * lupdate
 * lrelease
 * lconvert
 * QVFb
 * makeqpf
 * uic (User Interface Compiler)
 * rcc (Resource Compiler)
 * qtconfig
 * qconfig
 * qtdemo
 * qt3to4
 * qdbusxml2cpp
 * D-Bus Viewer
 * Qt Visual Studio Add-in
 * Qt Eclipse Integration
 * Qt Simulator
 * Nokia Smart Installer for Symbian
 * qmlviewer
 * Qt Quick, a QML based user interface development kit

Migration tools

 * Qt/MFC Migration Framework – For migration of Windows Microsoft Foundation Class Library based code
 * Qt Motif extension – For migration of Motif applications

History
Haavard Nord and Eirik Chambe-Eng (the original developers of Qt and the CEO and President, respectively, of Trolltech) began development of "Qt" in 1991, three years before the company was incorporated as Quasar Technologies, then changed the name to Troll Tech and then to Trolltech.

The toolkit was called Qt because the letter Q looked appealing in Haavard's Emacs font, and "t" was inspired by Xt, the X toolkit.

The first two versions of Qt had only two flavors: Qt/X11 for Unix and Qt/Windows for Windows. The Windows platform was only available under a proprietary license, which meant free/open source applications written in Qt for X11 could not be ported to Windows without purchasing the proprietary edition.

At the end of 2001, Trolltech released Qt 3.0, which added support for Mac OS X. The Mac OS X support was available only in the proprietary license until June 2003, when Trolltech released Qt 3.2 with Mac OS X support available under the GPL.

In June 2005, Trolltech released Qt 4.0.

Nokia acquired Trolltech ASA on June 17, 2008 and changed the name first to Qt Software, then to Qt Development Frameworks. Since then it focused on Qt development to turn it into the main development platform for its devices, including a port to the Symbian S60 platform. Version 1.0 of the Nokia Qt SDK was released on June 23, 2010. The source code was made available over Gitorious, a community oriented git source code repository, in order to gather an even broader community that is not only using Qt but also helping to improve it.

Licensing
At all times, Qt was available under a commercial license that allows the development of proprietary applications without restrictions on licensing. In addition, Qt has been gradually made available under a number of increasingly free licenses.

Until version 1.45, source code for Qt was released under the FreeQt license. This was viewed as not compliant with the open source principle by the Open Source Initiative and the free software definition by Free Software Foundation because while the source was available, it did not allow the redistribution of modified versions.

Controversy erupted around 1998 when it became clear that KDE’s KDE Software Compilation was going to become one of the leading desktop environments for Linux. As it was based on Qt, many people in the free software movement worried that an essential piece of one of their major operating systems would be proprietary.

With the release of version 2.0 of the toolkit, the license was changed to the Q Public License (QPL), a free software license but one regarded by the Free Software Foundation as incompatible with the GPL. Compromises were sought between KDE and Trolltech whereby Qt would not be able to fall under a more restrictive license than the QPL, even if Trolltech was bought out or went bankrupt. This led to the creation of the KDE Free Qt foundation, which guarantees that Qt would fall under a BSD-style license should no free/open source version of Qt be released during 12 months.

In 2000, Qt 2.2 was released under the GPL v2, ending all controversy regarding GPL compatibility.

In 2002, members of the KDE on Cygwin project began porting the GPL licensed Qt/X11 code base to Windows. This was in response to Trolltech's refusal to license Qt/Windows under the GPL on the grounds that Windows was not a free/open source software platform. The project achieved reasonable success although it never reached production quality.

This was resolved when Trolltech released Qt/Windows 4 under the GPL in June 2005. Qt 4 now supports the same set of platforms in the free software/open source editions as in the proprietary edition, so it is now possible to create GPL-licensed free/open source applications using Qt on all supported platforms. The GPL v3 with special exception was later added as an additional licensing option. The GPL exception allows the final application to be licensed under various GPL-incompatible free software/open source licenses such as the Mozilla Public License.

On January 14, 2009, Qt version 4.5 added another option, the LGPL, which should make Qt even more attractive for non-GPL open source projects and for closed applications.

UI Environments

 * KDE Plasma Workspaces, a popular Cross-platform graphical environment
 * MeeGo, Linux-based open source mobile operating system
 * Motorola A760, uses Qt/Embedded in its UI
 * OPIE
 * Qt Extended Improved
 * Razor-qt, a toolbox-like desktop environment
 * Unity 2D, the fall-back graphical environment on Ubuntu (operating system)

Window Managers for the X Window system
The following window managers utilize the Qt toolkit:


 * EggWM
 * integrity
 * KWin
 * qlwm

Software libraries

 * Advanced Component Framework
 * KDE Platform
 * LibQxt
 * Nokia's Qt Third-Party Widgets & Components
 * QtitanRibbon – Implementation Microsoft's RibbonUI for Qt
 * Qt Mobility
 * Qt Solutions
 * Qwt
 * ORM libraries (see List of object-relational mapping software for C++)

Other widget toolkits

 * Wt, a C++ library and application server for developing and deploying web applications. It resembles Qt, using also a widget tree and event-driven signal/slot programming model.
 * GTK+, another widely used open-source widget toolkit.
 * wxWidgets – cross platform open source C++ widgets toolkit developed by community