Title: Qt Technical Presentation
1QtTechnical Presentation
- Written by Eirik Aavitsland
- Qt Product Manager
- Trolltech
2Presentation Overview
- About Trolltech
- Overview of Qts architecture and features
3AboutTrolltech
4Trolltech
- Founded in 1994
- Offices
- Oslo, Norway (HQ)
- Santa Clara, California
- Brisbane, Australia
- Ownership
- Majority by employees
- Investments by Canopy Group, Inprise/Borland,
- Currently 75 employees and growing
- Main products Qt and Qtopia
5Product LineQt
- Platform-independent application framework
6Product lineQtopia
- Qt/EmbeddedQt for resource-constraineddevices
and embedded OSs - Qtopia Window system applications for PDAs,
smartphones, etc.
7Commercial Qt usage
- Worldwide 2000 customers, including
Adobe, Agilent, ARM, Boeing, Bosch, Cadence,
Canon, CEA Technologies, ChevronTexaco,
DaimlerChrysler, Deutsche Telekom, Disney, Earth
Decision Sciences, ESA, Fraunhofer, HP, IBM,
Intel, JD Edwards, Lockheed Martin, LogicaCMG,
Mentor Graphics, NASA, NEC, NTT, PGS, Pioneer,
Rohde Schwarz, Scania, Schlumberger, Sharp,
Shell, Siemens, Sony, STN-Atlas, Stryker
Leibinger, Synopsys, Thales...
8Non-commercial Qt usage
- Trolltech has been a key player in the Linux
marketplace since 1996 - Qt is a critical component in all Linux
distributions - Qt is the basis of KDE
- ...and thousands of other free software projects
- Widely used by Linux community
- thousands of developers
- millions of end-users
9QtFeatures
10Overview
- Qt is a C application framework
- Class library / Application Programmers
Interface (API) - Development tools
- Developers use the standard native tools to build
Qt apps - C compiler
- Debugger
- IDE
- etc.
11Multi-platform
- Qt provides a platform-independent encapsulation
of the local window system and operating system - The Qt API is the same on every platform
- Write once, compile everywhere
- Native executables on each platform
12Pros of Qts platform independence
- Single-source
- Shorter development time
- Less maintenance
- Change or add new target platforms at any time
- Avoid hard decisions on target platform
- Insulated against OS and window system changes
- Well prepared for future OSs and window systems
13Qt vs. Java
- Qt gives the same platform independence as Java
- But Qt applications must be recompiled for each
platform - Qt apps dont need a Virtual Machine
- Qt apps more lightweight, significantly faster
- It is easier to interface other libraries with Qt
- Java may arguably be a nicer language than C
- ...but Qt makes C nicer in various ways
- Handles garbage collection of Qt classes
- Adds signals and slots for inter-object
communication - Avoid use of, and does not require use of,
advanced C
14Class library overview
- Full set of GUI classes
- Widget set and GUI toolkit
- Operating system encapsulation classes
- OO, C class interface to C system calls
- SQL database access classes
- Data storing and retrieval
- Utility classes
- Commonly useful classes
- Integration Migration classes
- Using Qt with other libraries and legacy code
15GUI toolkit classes
- Full API to easily create the GUI
- Like MFC, Motif or Swing, but nicer...
- Complete set of GUI controls
- Menu bars, buttons, scroll bars, popup menus,
etc. etc. - Very simple to create custom controls
- Native Look Feel
- customizable / themeable
16OS encapsulation classes
- File directory handling
- Date time
- Registry / preferences
- Networking
- URL, socket, TCP, DNS, FTP, HTTP
- Process handling
- fork, terminate, kill, stdin/stdout/stderr I/O
- Threading
- start, terminate, semaphore, mutex, wait
- Dynamic library loading
17SQL database classes
- Store, retrieve, query, traverse modify DB data
- Database-independent API
- Oracle, Sybase/MS SQL Server, MySQL, PostgreSQL,
ODBC - DB-aware widgets
- editable forms and tableviews
18Utility classes
- String and regular expressions
- Unicode
- Text and binary I/O
- codecs
- Collections
- Optional alternatives to STL collections
- XML I/O
- Parser with SAX2 interface
- DOM level 2 implementation
19Integration Migration classes
- OpenGL
- 3D graphics rendering in a Qt widget
- ActiveX
- Host ActiveX controls in a Qt app
- Use Qt to create ActiveX controls
- Motif
- co-exist with legacy Motif code stepwise
migration - Microsoft Foundation Classes
- co-exist with legacy MFC code stepwise migration
- Netscape Plugins
- Create Netscape/Mozilla/Opera LiveConnect plugins
with Qt
20Development ToolsOverview
- Qt Designer
- Visual GUI builder
- Qt Linguist
- Language translators tool
- Qt Assistant
- Help browser
- qmake
- Makefile generator
21Qt Designer
- WYSIWYG, drag drop GUI builder
- Widget properties editor
- Supports the Qt auto-layout system
- Designs stored in open, documented XML format
- Does not interfere with users source code
MyDialog.xml
MyDialogBase.cpp
uic
MyDialog.cpp
22Documentation
- Reference Manual
- HTML
- generated from the source code
- Fully cross-referenced
- Browsable from Qt Assistant
- or normal web browser doc.trolltech.com
- Tutorials
- Examples
- Qt programming books
23Services
- Maintenance
- Maintenance releases every 6-10 weeks
- Feature releases 1-2 times per year
- Support
- Email-based
- Training
- On-site or open enrollment
- Consulting
- Partner companies
24Qt Architecture Signals Slots
- Type-safe callback mechanism
- Object-oriented
- Facilitates loose coupling / encapsulation
- Sender and receiver does not know about each
other - 1-to-many, many-to-1, many-to-many
25Thank you