Qt (framework)
| It has been suggested that Qt Development Frameworks be merged into this article or section. (Discuss) |
The Qt designer used for GUI designing |
|
| Developer(s) | Nokia |
| Stable release | 4.6.3[1] / June 8, 2010 |
| Development status | Active |
| Written in | C++ |
| Operating system | Cross-platform |
| Type | Application framework |
| License | GNU LGPL 2.1 GNU GPL 3, with Qt special exception Commercial Developer License[2] |
| Website | qt.nokia.com |
Qt (pronounced officially as cute (/kyut/) though commonly pronounced as Q.T. (/ˈkyu ti/)[3][4]) is a cross-platform application development framework widely used for the development of GUI programs (in which case it is known as a widget toolkit), and also used for developing non-GUI programs such as console tools and servers. Qt is most notably used in Google Earth, KDE, Opera (before 10.60 version), OPIE, Skype, MO-Call, VLC media player and VirtualBox. It is 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, on June 17, 2008.[5]
Qt uses standard C++ but makes extensive use of a special pre-processor (called the Meta Object Compiler, or moc) to enrich the language. Qt can also be used in several other programming languages via language bindings. It runs on all major platforms and 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.
Contents |
[edit] 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.[6]
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.
Nokia acquired Trolltech ASA in 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 23 June 2010.[7] 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.
[edit] Licensing
At all times, Qt was available under a commercial license that allows the development of proprietary applications without restrictions on licensing. In addition to that, Qt has been gradually made available under a number of increasingly free licenses. At present, Qt is available under the GNU Lesser General Public License, making it available for use in both proprietary and free software.
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 was going to become one of the leading desktop environments for Linux. As KDE 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.
This gave rise to two efforts: the Harmony toolkit, which sought to duplicate Qt under a free software license, and the GNOME desktop, which intended to supplant KDE entirely. The GNOME Desktop uses the GTK+ toolkit, which was originally written for the GIMP and primarily uses the C language.
In 2002, members of the KDE on Cygwin project began porting the GPL licensed Qt/X11 code base to Windows.[8] 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.[9][10] 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[11] 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.
As announced on January 14, 2009, Qt version 4.5 added another option, the LGPL,[12] which should make Qt even more attractive for non-GPL open source projects and for closed applications.[13]
[edit] Platforms
Qt is released by Nokia on the following platforms:
- Linux/X11 – Qt for X Window System (Unix / Linux)
- Mac OS X – Qt for Apple Mac OS X. Support for applications on top of Cocoa APIs
- Windows – Qt for Microsoft Windows
- Embedded Linux – Qt for embedded platforms (PDA, Smartphone, etc.)
- Windows CE – Qt for Windows CE[14]
- Symbian – Qt for the Symbian platform.[15][16][17][18][19][20][21][22] Qt is to replace Nokia's Avkon as the supported UI SDK for the development of Symbian applications.[23]
- Maemo – Qt for Maemo, merged with Moblin to MeeGo
[edit] 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[24]
- Qt for Haiku – Qt for Haiku OS[25]
- Qt for OS/2 – Qt for OS/2 eCS platform.[26]
- Qt-iPhone – Experimental development of Qt for the iPhone.[27]
- Android-Lighthouse – Experimental development of Qt for Android.[28]
- Qt for webOS – Experimental development of Qt for webOS on Palm Pre.[29][30]
- Qt for Amazon Kindle DX – Experimental development of Qt for Amazon Kindle DX.[31]
[edit] Varieties
In addition to the editions of Qt above, the following products exist but commercial support and development has stopped[32][33]:
- Qt Jambi – Qt for Java
- Qt Extended – Application platform for Embedded Linux-based mobile computing devices
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
[edit] 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.
Qt 4.1, released on December 19, 2005, introduced integrated SVG Tiny support, a PDF backend to Qt's printing system, and a few other features.
Qt 4.2, released on October 4, 2006, introduced Windows Vista support, introduced native CSS support for widget styling, as well as the QGraphicsView framework for efficient rendering of thousands of 2D objects onscreen, to replace Qt 3.x's QCanvas class.
Qt 4.3, released on May 30, 2007, improved Windows Vista support, improved OpenGL engine, SVG file generation, added QtScript (ECMAScript scripting engine based on QSA).[34]
Qt 4.4, released on May 6, 2008. Features included are improved multimedia support using Phonon, enhanced XML support, a concurrency framework to ease the development of multi-threaded applications, an IPC framework with a focus on shared memory, and WebKit integration.
Qt 4.5, released on March 3, 2009. Major included features are QtCreator, improved graphical engine, improved integration with WebKit, OpenDocument Format write support and new licensing options, as well as Mac OS X Cocoa framework support.
Qt 4.6, released on December 1, 2009. New APIs are Framework Animation, Gestures, Multi-touch. Now supports (as Tier 1) Symbian and (as Tier 2) Windows 7 and Mac OS X 10.6, support extended for some UNIX systems. Improvements have also been made to overall performance.
[edit] Modules
[edit] Modules for general software development
- QtCore — QtCore 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.
- QtGui — 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.
- QtMultimedia — QtMultimedia module implements low-level multimedia functionality.
- QtNetwork — 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.
- QtOpenGL — QtOpenGL module contains classes that enable the use of OpenGL in rendering 3D graphics.
- QtOpenVG — QtOpenVG module is a plugin that provides support for OpenVG painting.
- QtScript
- QtScriptTools — QtScriptTools module provides additional components for applications that use Qt Script.
- QtSql — 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.
- QtSvg — QtSvg module contains classes for displaying the contents of SVG files. It supports the static features of SVG 1.2 Tiny.
- QtWebKit — QtWebKit module provides a web browser engine as well as classes to render and interact with web content.
- QtXml — QtXml module implements SAX and DOM interfaces to Qt's XML parser.
- QtXmlPatterns — QtXmlPatterns module provides support for XPath, XQuery, XSLT and XML Schema validation.
- Phonon
- Qt3Support — Qt3Support module provides classes that ease porting from Qt 3 to Qt 4.
- QtDeclarative [35] - engine for declaratively building fluid user interfaces in QML
[edit] Modules for working with Qt's tools
- QtDesigner
- QtUiTools
- QtHelp
- QtTest
[edit] Modules for Unix developers
- QtDBus — QtDBus module is a library that you can use to perform Inter-Process Communication using the D-Bus protocol.
[edit] Modules for Windows developers
- QAxContainer — QAxContainer module is an extension for accessing ActiveX controls and COM objects.
- QAxServer — QAxServer module is a static library that you can use to turn a standard Qt binary into a COM server.
[edit] Bindings
As shown in the table below, Qt has a range of bindings for various languages[36] that implement some or all of its feature set.
| language | name - description of binding | QtCore | QtDesigner | QtGui | QtNetwork | QtOpenGL | QtSql | QtScript | QtSvg | QtTest | QtUiTools | QtWebKit | QtXml | license for open-source apps | license for proprietary apps |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Ada | QtAda | Yes | Yes | Yes | No[37] | Yes | Yes | No | No | No | Yes | No | Yes | GPL | GMGPL + fee |
| C++ | Qt – native C++ | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | LGPL | LGPL or Proprietary + fee |
| C# & .NET | Qyoto – See also Kimono for KDE | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | ||
| C# & .NET | qt4dotnet | LGPL | LGPL | ||||||||||||
| D | QtD | ||||||||||||||
| Haskell | Qt Haskell | ||||||||||||||
| Harbour | hbqt | Yes | No | Yes | No | No | No | No | No | No | No | No | GPL | LGPL like | |
| Java | Qt Jambi | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | LGPL | LGPL |
| Lisp | CommonQt – Bindings for Common Lisp | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | BSD License | BSD License |
| Lua | lqt - Bindings | Yes | No[38] | Yes | Yes | Yes | No | Yes | Yes | No | No | Yes | No | MIT | MIT |
| Lua | QtLua - Bindings and script engine | LGPL | LGPL | ||||||||||||
| Pascal | FreePascal Qt4 | ||||||||||||||
| Perl | PerlQt4 | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | GPL | No |
| PHP | PHP-Qt | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | LGPL | LGPL |
| Python | PyQt – has an associated text (ISBN 0132354187). | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | GPL | Proprietary + fee |
| Python | PySide – from OpenBossa (a subsidiary of Nokia). | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | LGPL | LGPL | ||
| Python | PythonQt | LGPL | LGPL | ||||||||||||
| R | qtbase | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | GPL | No |
| Ruby | QtRuby | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | LGPL | LGPL |
| Tcl | qtcl | GPL | No | ||||||||||||
| language | name & description of binding | QtCore | QtDesigner | QtGui | QtNetwork | QtOpenGL | QtSql | QtScript | QtSvg | QtTest | QtUiTools | QtWebKit | QtXml | license for open-source apps | license for proprietary apps |
[edit] Communities
- (English) Qt Centre
- (French) Qt.Developpez.com
- (French) Le Site du Zéro
- (Italian) Qt Italia
[edit] Migration tools
- Qt/MFC Migration Framework – For migration of Windows Microsoft Foundation Class Library based code
- Qt Motif extension – For migration of Motif applications
[edit] Design
The innovation of Qt when it was first released relied on a few key concepts.
[edit] 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 APIs of the different platforms to draw the Qt controls, and so do not suffer from such issues.[39]
[edit] 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.
[edit] QtScript ECMAScript interpreter
Qt Script for Applications 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,[40] which is based on QSA,[41] is integrated as a core part of Qt and is no longer a separate library.
[edit] Qt hello world
#include <QtGui> int main(int argc, char *argv[]) { QApplication app(argc, argv); QLabel label("Hello, world!"); label.show(); return app.exec(); }
[edit] Compiling and executing Qt hello world program
1. Create a folder named Hello
2. Copy paste the above program as Hello.cpp in folder Hello
3. At Hello folder run
a. qmake -project b. qmake c. make/gmake/nmake - as needed by OS and compiler environment
4. Execute ./release/Hello (Or release\Hello.exe in Windows)
[edit] Application development support
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.
The Qt for Symbian development group has many quality-controlled articles available.
[edit] Uses
[edit] Environments
- Antico, a desktop environment[42]
- KDE, a popular desktop environment for Unix-like operating systems
- MeeGo, Linux-based open source mobile operating system
- Motorola A760, uses Qt/Embedded in its UI
- OPIE
- Qt Extended Improved
- Symbian from version 4
[edit] Window Managers for the X Window system
The following window managers utilize the Qt toolkit:
[edit] Applications
- 3DSlicer, a free open source software for visualization and medical image computing
- AcetoneISO, a software to mount most common images
- Autodesk Maya, 3D modelling and animation software
- Avidemux, a Free Software program designed for multi-purpose video editing and processing
- Doxygen, an API document generator
- Emergent, a neural network simulator.
- Freemat, a free numerical computing environment and programming language
- Gadu-Gadu, a popular Polish instant messaging client
- GoldenDict, an open-source dictionary software
- Google Earth, a 3D map program
- Hydrogen, an advanced drum machine.
- Last.fm Player, the desktop client for the popular internet radio and music community website
- Launchy, the open source keystroke launcher for Windows and Linux
- LMMS, a free open source sequencer and software synthesis package
- LyX, a GUI frontend to LaTeX
- Mathematica, Linux version uses Qt for the GUI front-end
- Mixxx, cross-platform open source DJ mixing software
- MuseScore, a WYSIWYG graphical music notation editor
- MythTV, an open source digital video recorder
- Nimbuzz, a instant messaging and VoIP application
- Opera, cross-platform internet browser
- Orange, is a data mining and data visualization software suite
- Psi, an instant messaging client for XMPP
- Qt Creator, a cross-platform IDE for C++ and QML
- Quantum GIS, a free desktop GIS
- Rosegarden, a free software digital audio workstation progra
- Scribus, a desktop publishing application
- Skype, a P2P VOIP application[43]
- SMPlayer, a multiplatform multimedia player front-end for MPlayer.
- TeamSpeak, cross-platform voice communication software
- Texmaker, a cross-platform LaTeX editor
- Tlen.pl, a popular Polish instant messaging client
- TOra, a database administration tool[44]
- UniversalIndentGUI,an application which helps the user to beautify, reformat or indent various kinds of code.
- Valknut, a program that uses the Direct Connect protocol.
- VirtualBox, a PC virtualization application
- VisIt, an interactive parallel visualization tool for viewing scientific data
- VisTrails, a scientific workflow management and visualization system
- VLC Media Player, an open source media player.
- VoxOx, a unified communications software.
- Xconfig, Linux Kernel configuration tool
[edit] See also
| Wikibooks has a book on the topic of |
[edit] References
- ^ "Nokia Releases Qt 4.6.3". 08 June 2010. http://qt.nokia.com/about/news/nokia-releases-qt-4.6.3. Retrieved 2010-06-13.
- ^ "Qt Licensing". http://www.qtsoftware.com/products/licensing. Retrieved 2010-02-19.
- ^ "That Smartphone Is So Qt". Ashlee Vance. The New York Times. 16 February 2010. http://bits.blogs.nytimes.com/2010/02/16/that-smartphone-is-so-qt/. Retrieved 2010-02-19.
- ^ "The Qt 4 Dance" (video). http://video.google.com/videoplay?docid=-1435432529445611697. Retrieved 2010-02-19.
- ^ Qt Software — Nokia acquired Trolltech
- ^ "A Brief History of Qt". http://safari.oreilly.com/0131872494/pref04. Retrieved 2007-12-20.
- ^ http://labs.trolltech.com/blogs/2010/06/23/nokia-qt-sdk-10-released/
- ^ Q../Windows Edition history, 5 June 2006
- ^ E-mail to the kde-cygwin mailing list by Chris January, 4 February 2003
- ^ Qt Non-commercial FAQ, 5 October 2003
- ^ Nokia Corporation Qt GPL Exception Version 1.3
- ^ LGPL License Option Added to Qt January 14, 2009
- ^ ICS Whitepaper on the Implications of Qt under LGPL for Commercial and Government users
- ^ Qt Software — Qt for Windows CE
- ^ Nokia - Nokia enriches application development with Qt for S60
- ^ Qt for S60 - Forum Nokia Wiki
- ^ Symbian - Nokia enriches application development with Qt for S60
- ^ All About Symbian - Nokia Announce Technology preview of Qt on S60
- ^ ars technica - Nokia releases first Qt preview for Symbian S60
- ^ Qt Labs Blogs - We’re porting Qt to S60!
- ^ Qt Software — Technology Preview - Qt for S60
- ^ Qt Software — How to get Qt running on your S60 phone
- ^ David Wood: S60 / Avkon are dead
- ^ KDE on OpenSolaris
- ^ Qt4 for Haiku?
- ^ Qt 4 Application and UI Framework for eCS
- ^ Experimental development of qt for the iPhone
- ^ Qt android port
- ^ Qt webOS port
- ^ Blog: Qt on the Palm Pre
- ^ Blog: Qt on Amazon Kindle DX
- ^ Qt Software — Discontinues Qt Extended
- ^ Qt Software — To discontinue Qt Jambi after 4.5 release
- ^ Trolltech: What’s New in Qt 4.3
- ^ [1]
- ^ QT Language Bindings
- ^ [2] Supported Qt modules in QtAda
- ^ [3] Supported Qt modules in lqt
- ^ Products - Qt – A cross-platform application and UI framework 'Qt uses the native graphics APIs of each platform it supports, taking full advantage of system resources and ensuring that applications have native look and feel.'
- ^ Qt 4.3: QtScript Module
- ^ QSA 1.2: Qt Script for Applications
- ^ http://www.antico.netsons.org/index.html
- ^ Qt Software — Qt in use - Skype
- ^ TOra uses the Qt library
[edit] Bibliography
- Summerfield, Mark (August 23, 2010), Advanced Qt Programming: Creating Great Software with C++ and Qt 4 (1st ed.), Addison-Wesley, pp. 550, ISBN 978-0321635907, http://www.qtrac.eu/aqpbook.html
- Fitzek, Frank H. P.; Mikkonen, Tommi; Torp, Tony (May 17, 2010), Qt for Symbian (1st ed.), Wiley, pp. 160, ISBN 0470750103, http://eu.wiley.com/WileyCDA/WileyTitle/productCd-0470750103.html
- Blanchette, Jasmin; Summerfield, Mark (February 14, 2008), C++ GUI Programming with Qt 4 (2nd ed.), Prentice Hall, pp. 752, ISBN 978-0132354165, http://www.informit.com/store/product.aspx?isbn=0132354160
- Summerfield, Mark (October 28, 2007), Rapid GUI Programming with Python and Qt (1st ed.), Prentice Hall, pp. 648, ISBN 978-0132354189, http://www.qtrac.eu/pyqtbook.html
- Molkentin, Daniel (July 19, 2007), The Book of Qt 4: The Art of Building Qt Applications (1st ed.), No Starch Press, pp. 440, ISBN 978-1593271473, http://nostarch.com/qt4.htm
- Thelin, Johan (August 3, 2007), Foundations of Qt Development (1st ed.), Apress, pp. 528, ISBN 978-1590598313, http://www.apress.com/book/view/9781590598313
- Dalheimer, Matthias (January 2002), Programming with Qt (2nd ed.), O'Reilly Media, pp. 512, ISBN 978-0596000646, http://oreilly.com/catalog/9780596000646/
- Ezust, Alan; Ezust, Paul (September 10, 2006), An Introduction to Design Patterns in C++ with Qt 4 (1st ed.), Prentice Hall, pp. 656, ISBN 978-0131879058, http://www.informit.com/store/product.aspx?isbn=0131879057
[edit] External links
- Qt Homepage
- The Qt blog
- Qt Labs
- Online Reference Documentation
- Planet Qt
- Qt Centre
- Free Qt Applications
- Qt Software Development Team
- C++ GUI Programming with Qt 4/first edition. The complete book (PDF in a ZIP); suitable for those who can already program in C++, but no GUI programming experience necessary.
- An Introduction to Design Patterns in C++ with Qt4. The full book from a Prentice Hall edition teaching C++ programming from the ground up, using Qt 4.1
- Qt compared with Java
- Qtitan - Nokia-Qt Third-Party Widgets & Components
|
||||||||||||||||||||||||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||||||||||||||||||