Qt Reference Documentation

Qt Backends

Subclassing QStyledItemDelegate

QStyledItemDelegate and QItemDelegate

A Note for X11 Users

Overlays

Painting Techniques

Top-Level and Child Widgets

Composite Widgets

Custom Widgets and Painting

Size Hints and Size Policies

Events

Groups of Functions and Properties

Widget Style Sheets

Transparency and Double Buffering

A Note on GUI Types

Using canConvert() and convert() Consecutively

Key Bindings

Improving Performance

Standard Shortcuts

Keyboard Layout Issues

GNU Emacs Style Key Sequences

Versioning

Reading and writing raw binary data

Modal Dialogs

Modeless Dialogs

Default Button

Escape Key

Extensibility

Return Value (Modal Dialogs)

Code Examples

Standard Roles and Data Types

Subclassing

Usage

Subclassing

Thread Safety

URL Handlers

Notes for Windows users

Subclassing

Notes for Windows Users

Settings

Drawing

Rendering Quality

Coordinate Transformations

Clipping

Composition Modes

Limitations

Improving Performance

SOCKS5

Embedding a Widget with QGraphicsProxyWidget

Synchronizing Widget States

Additional License Information

Rendering

Coordinates

Rendering

Coordinates

Basic Usage

Severity Levels

Advanced Usage

Default and Escape Keys

Pen Style

Cap Style

Join Style

Creating Your Own Codec Class

Relationships and Navigation

Properties

Actions and Selection

Objects and children

Drag and Drop

Reading and Writing Image Files

Image Information

Pixel Manipulation

Image Formats

Image Transformations

Legal Information

Using One Big Widget

Using a Very Big View with Some Widgets

Using a Very Big View with Many Widgets

Details Relevant for All Views

Reading and Writing Image Files

Pixmap Information

Pixmap Conversion

Pixmap Transformations

Subclassing QSpinBox

Integer vs. Floating Point Precision

Alpha-Blended Drawing

Predefined Colors

The HSV Color Model

The CMYK Color Model

XQuery Sequences

Making Classes that Use QIcon

Headers

Rows and Columns

Cells

Large tables

Selections

Signals

Note on 8-bit Character Comparisons

Auto-Connection

Dynamic Properties

A Trivial Example

Wizard Look and Feel

Elements of a Wizard Page

Registering and Using Fields

Creating Linear Wizards

Creating Non-Linear Wizards

Subclassing

Standard Editing Widgets

Subclassing

Subclassing

Subclassing

Introduction and Concepts

Using QPlainTextEdit as a Display Widget

Read-only Key Bindings

Using QPlainTextEdit as an Editor

Syntax Highlighting

Editing Key Bindings

Differences to QTextEdit

Subwindow Handling

Notes for X11 Users

Approaches to Binding Values

Dynamic Resource Loading

Reading Files Directly

Using Streams to Read Files

Signals

Platform-Specific MIME Types

Groups of Functions

Event Handling and Propagation

Caveats

Basic Usage

Iterating Through Completions

The Completion Model

Handling Tree Models

Document Source and Contents

Navigation

Notes for X11 Users

Notes for Mac OS X Users

Notes for Windows and Mac OS X Users

Creating and using preview widgets

Setting a Style

Developing Style-Aware Custom Widgets

Creating a Custom Style

Using a Custom Style

Right-to-Left Desktops

Styles in Item Views

Performance Issues

Undo and Redo Actions

Command Compression and Macros

Clean State

Framebuffer Management

Palette Management

Drawing on Screen

Properties

Non-atomic convenience operators

The Atomic API

Reference counting

Memory ordering

Test-and-set

Fetch-and-store

Fetch-and-add

Feature Tests for the Atomic API

Non-atomic convenience operators

The Atomic API

Memory ordering

Test-and-set

Fetch-and-store

Fetch-and-add

Feature Tests for the Atomic API

Adding strings

Iterating over the strings

Manipulating the strings

QMenu on Qt/CE

Initializing a String

Manipulating String Data

Querying String Data

Converting Between 8-Bit Strings and Unicode Strings

Note for C Programmers

Distinction Between Null and Empty Strings

Subclassing

Qt Main Window Framework

Creating Main Window Components

Creating Menus

Creating Toolbars

Creating Dock Widgets

The Status Bar

Storing State

Navigation and Directory Operations

Files and Directory Contents

The Current Directory and Other Special Paths

Path Manipulation and Strings

Examples

Comparing QXmlNames

Sorting

Filtering

Subclassing

Evaluating Scripts

Engine Configuration

Script Exceptions

Script Object Creation

QObject Integration

Support for Custom C++ Types

Importing Extensions

Native Functions

Long-running Scripts

Core Debugging/Tracing Facilities

Introduction

Characters and Abbreviations for Sets of Characters

Sets of Characters

Quantifiers

Capturing Text

Assertions

Wildcard Matching

Notes for Perl Users

Code Examples

Elements of QWebView

Subclassing

Composing a QPainterPath

QPainterPath Information

QPainterPath Conversion

Examples

Introduction and Concepts

Using Q3TextEdit as a Display Widget

Read-only key bindings

Using Q3TextEdit in Qt::LogText Mode

Using Q3TextEdit as an Editor

Editing key bindings

Running Queries

Binding A Query To A Starting Node

Reentrancy and Thread-Safety

Error Handling

Resource Management

Moving Header Sections

Appearance

Writing a Custom Layout

Activating the Layout

Activating the Layout Implicitly

Event Handling

Margin Handling

Implicit vs Explicit Sharing

Size Hints and Size Policies in QGraphicsLinearLayout

Spacing within QGraphicsLinearLayout

Stretch Factor in QGraphicsLinearLayout

QGraphicsLinearLayout Compared to Other Layouts

Dynamic Allocation

Static Allocation

Rendering

Subclassing QGraphicsLayoutItem

Nesting QGraphicsLayoutItems

Introduction and Concepts

Using QTextEdit as a Display Widget

Read-only Key Bindings

Using QTextEdit as an Editor

Drag and Drop

Editing Key Bindings

Appearance

Rendering Graphics

Basic Matrix Operations

Client Administration

Mouse Handling

Keyboard Handling

Display Handling

Input Method Handling

Creating Custom Input Methods

Using Input Methods

Basic Usage

QVariant and GUI Types

Key Syntax

Fallback Mechanism

Restoring the State of a GUI Application

Accessing Settings from Multiple Threads or Processes Simultaneously

Platform-Specific Notes

Locations Where Application Settings Are Stored

Accessing INI and .plist Files Directly

Accessing the Windows Registry Directly

Accessing Common Registry Settings on Windows

Platform Limitations

Rendering Graphics

Basic Matrix Operations

Namespaces

Incremental parsing

Performance and memory consumption

Platform Dependent Look and Feel

QMenuBar on Qt/Mac

QMenuBar on Qt/CE

Examples

World Time Clock Builder Example

Preparation

Loading and Building the Form

Shaped Clock Example

ShapedClock Class Definition

ShapedClock Class Implementation

Notes on Widget Masks

Custom Widget Plugin Example

Preparation

AnalogClock Class Definition and Implementation

AnalogClockPlugin Class Definition

AnalogClockPlugin Implementation

Composition Modes

QtDBus XML compiler (qdbusxml2cpp)

Timers

Wait Conditions Example

Global Variables

Producer Class

Consumer Class

The main() Function

Pad Navigator Example

About Qt

Settings Editor Example

IDC - The Interface Description Compiler (ActiveQt)

Draggable Text Example

Drag and Drop

Configuration

Dragging

Dropping

Overriding Proposed Actions

Subclassing Complex Widgets

Drag and Drop Actions

Adding New Drag and Drop Types

Drop Actions

Drop Rectangles

The Clipboard

Examples

Interoperating with Other Applications

Porting to Qt 4 - Drag and Drop

Dragging

Dropping

MIME Types and Data

Windows CE - Working with Custom SDKs

Creating a Custom Build Specification

Fine-Tuning Options

Windows CE - Using shadow builds

Qt Widget Gallery

Qt's Tools

Spin Boxes Example

Window Class Definition

Window Class Implementation

Concentric Circles Example

CircleWidget Class Definition

CircleWidget Class Implementation

Window Class Definition

Window Class Implementation

QtNetwork Module

Configuring the Build Process

Writing HTTP and FTP Clients with QHttp and QFtp

Using TCP with QTcpSocket and QTcpServer

Using UDP with QUdpSocket

Resolving Host Names using QHostInfo

Simple Text Viewer Example

MainWindow Class Definition

MainWindow Class Implementation

FindFileDialog Class Definition

FindFileDialog Class Implementation

Summary

Hello GL Example

GLWidget Class Definition

GLWidget Class Implementation

Widget Construction and Sizing

OpenGL Initialization

Resizing the Viewport

Painting the Scene

Mouse Handling

Utility Functions

Window Class Definition

Window Class Implementation

Summary

Ported Canvas Example

FTP Example

Vector Deformation

Member Function Index

Star Delegate Example

StarDelegate Class Definition

StarDelegate Class Implementation

StarEditor Class Definition

StarEditor Class Implementation

StarRating Class Definition

StarRating Class Implementation

The Function

Possible Extensions and Suggestions

Blocking Fortune Client Example

User Interface Compiler (uic)

Options

Examples

Calendar Example

MainWindow Class Definition

MainWindow Class Implementation

Flow Layout Example

Arrow Pad Example

Line by Line Walkthrough

Translating to French and Dutch

Exercises

OpenGL in an HTML page

OpenGL Example (ActiveQt)

Why Doesn't Qt Use Templates for Signals and Slots?

Syntax matters

Code Generators are Good

GUIs are Dynamic

Calling Performance is Not Everything

No Limits

Mandelbrot Example

RenderThread Class Definition

RenderThread Class Implementation

MandelbrotWidget Class Defintion

MandelbrotWidget Class Implementation

The main() Function

D-Bus Viewer

Printing with Qt

Paint Devices and Printing

Creating a QPrinter

Painting onto a Page

Coordinate Systems

Printing from Complex Widgets

Notes about PDF Licensing

Interview

Concurrent Map and Map-Reduce

Concurrent Map

Concurrent Map-Reduce

Additional API Features

Using Iterators instead of Sequence

Blocking Variants

Using Member Functions

Using Function Objects

Using Bound Function Arguments

QtHelp Module

Topics

Overview

Generating Qt Help

Creating a Qt Help Collection

Using Qt Help

Using Qt Assistant

Using QHelpEngine API

Qt Help Project

Qt Help Project File Format

Namespace

Virtual Folders

Custom Filters

Filter Section

Filter Attributes

Table of contents

Keywords

Files

Trivial Wizard Example

Introduction Page

Registration Page

Conclusion Page

Function

Unicode

Information about Unicode on the Web

The Standard

Unicode in Qt

QtAssistant Module

QtSvg Module

SVG Support

Configuring the Build Process

Rendering SVG files

Additional Information

Overview of Qt's Undo Framework

Introduction

Classes

Concepts

Qt3Support Module

Resource Compiler (rcc)

QTestLib Manual

QTestLib Features

QTestLib API

Using QTestLib

Creating a test

Building a Test

QTestLib Command Line Arguments

Syntax

Options

Using QTestLib remotely on Windows CE

Using

Syntax

Options

QtRemote

Requirements

QTestLib Tutorial

Chapter 1: Writing a Unit Test

Writing a Test

Executing a Test

Chapter 2: Data Driven Testing

Writing the Data Function

Rewriting the Test Function

Chapter 3: Simulating GUI Events

Writing a GUI test

Chapter 4: Replaying GUI Events

Writing the Data Function

Rewriting the Test Function

RSS-Listing Example

Loopback Example

Porting Qt Applications to Qt for Embedded Linux

Grouped Classes

Advanced Widgets

Abstract Widget Classes

Accessibility Classes

Widget Appearance and Style

Main Window and Related Classes

Basic Widgets

Database Classes

Standard Dialog Classes

Desktop Environment Classes

Drag And Drop Classes

Environment Classes

Event Classes

Explicitly Shared Classes

Layout Management

Graphics View Classes

Help System

Input/Output and Networking

Miscellaneous Classes

Model/View Classes

Multimedia, Graphics and Printing

Object Model

Organizers

Plugin Classes

Qt for Embedded Linux Classes

Qt on Windows CE

Implicitly Shared Classes

Overview

Implicit Sharing in Detail

List of Classes

Text Processing Classes

Threading Classes

Date and Time Classes

Non-GUI Classes

XML Classes

Scripting Classes

Font Sampler Example

QtDBus module

System Tray Icon Example

Window Class Definition

Window Class Implementation

Mac Main Window Demo

Movie Example

Mouse Calibration Example

The Main Program

Calibration Class Definition

Calibration Class Implementation

The Network Module in Qt 4

General Overview

Example Code

TCP Client

TCP Server

UDP Senders and Receivers

Comparison with Qt 3

Grabber Example

Style Plugin Example

SimpleStylePlugin Class Definition

SimpleStylePlugin Class Implementation

The function

The Simple Style Plugin Profile

Related articles and examples

SQL Database Drivers

Supported Databases

Building the Drivers Using Configure

Building the Plugins Manually

QMYSQL for MySQL 4 and higher

QMYSQL Stored Procedure Support

Embedded MySQL Server

How to Build the QMYSQL Plugin on Unix and Mac OS X

How to Build the QMYSQL Plugin on Windows

QOCI for the Oracle Call Interface (OCI)

General Information about the OCI plugin

OCI User Authentication

OCI BLOB/LOB Support

How to Build the OCI Plugin on Unix and Mac OS X

How to Build the OCI Plugin on Windows

QODBC for Open Database Connectivity (ODBC)

General Information about the ODBC plugin

ODBC Stored Procedure Support

ODBC Unicode Support

How to Build the ODBC Plugin on Unix and Mac OS X

How to Build the ODBC Plugin on Windows

QPSQL for PostgreSQL (Version 7.3 and Above)

General Information about the QPSQL driver

QPSQL Unicode Support

QPSQL BLOB Support

How to Build the QPSQL Plugin on Unix and Mac OS X

How to Build the QPSQL Plugin on Windows

QTDS for Sybase Adaptive Server

General Information about QTDS

How to Build the QDTS Plugin on Unix and Mac OS X

How to Build the QDTS Plugin on Windows

QDB2 for IBM DB2 (Version 7.1 and Above)

General Information about QDB2

How to Build the QDB2 Plugin on Unix and Mac OS X

How to Build the QDB2 Plugin on Windows

QSQLITE2 for SQLite Version 2

QSQLITE for SQLite (Version 3 and Above)

General Information about QSQLITE

How to Build the QSQLITE Plugin

QSQLITE File Format Compatibility

QIBASE for Borland InterBase

General Information about QIBASE

QIBASE Unicode Support and Text Encoding

QIBASE Stored procedures

How to Build the QIBASE Plugin on Unix and Mac OS X

How to Build the QIBASE Plugin on Windows

Troubleshooting

How to Write Your Own Database Driver

The Qt 4 Style API

General Overview

Example Code

Comparison with Qt 3

Porting to Graphics View

Introduction

Porting from Q3Canvas

Porting table

Porting scenes with tiles

Porting from Q3CanvasView

Porting table

Other differences

Porting from Q3CanvasItem

Q3CanvasPolygonalItem

Q3CanvasEllipse

Q3CanvasLine

Q3CanvasPolygon

Q3CanvasSpline

Q3CanvasRectangle

Q3CanvasSprite

Q3CanvasPixmap, Q3CanvasPixmapArray

Q3CanvasText

Q3CanvasItemList

Two Simple Qt Widgets

Multiple Example (ActiveQt)

Music Player Example

MainWindow Class Definition

MainWindow Class Implementation

The main() function.

Colliding Mice Example

Mouse Class Definition

Mouse Class Definition

The Main() Function

Find Files Example

Window Class Definition

Window Class Implementation

Threaded Fortune Server Example

Class Wizard Example

ClassWizard Class Definition

The ClassWizard Class

The IntroPage Class

The ClassInfoPage Class

The CodeStylePage Class

Debugging Techniques

Configuring Qt for Debugging

Mac OS X and Xcode

Command Line Options Recognized by Qt

Warning and Debugging Messages

Providing Support for the qDebug() Stream Operator

Debugging Macros

Common Bugs

Widgets Tutorial

Introduction

Creating a Window

Using Layouts

Hello Script Example

Hello tr() Example

Line by Line Walkthrough

Running the Application in English

Creating a Latin Message File

Translating to Latin with Qt Linguist

Running the Application in Latin

World Time Clock Plugin Example

WorldTimeClock Class

WorldTimeClockPlugin Class

The Project File: worldtimeclockplugin.pro

Media Player

Third-Party Licenses Used in Qt

FreeType 2 () version 2.3.5

HarfBuzz ()

MD5 ( and )

The Independent JPEG Group's JPEG Software () version 6b

MNG Library () version 1.0.10

PNG Reference Library () version 1.2.25

TIFF Software Distribution () version 3.8.2

SQLite () version 3.5.4

Wintab API ()

Data Compression Library () version 1.2.3

Tree Model Completer Example

The Resource File

TreeModelCompleter Class Definition

TreeModelCompleter Class Implementation

MainWindow Class Definition

MainWindow Class Implementation

Function

Calculator Form Example

Preparation

CalculatorForm Class Definition

CalculatorForm Class Implementation

How to Learn Qt

Path Stroking

Ported Asteroids Example

Multiple Inheritance Example

CalculatorForm Definition

CalculatorForm Implementation

Function

Standard Dialogs Example

Drill Down Example

InformationWindow Class Definition

InformationWindow Class Implementation

View Class Definition

View Class Implementation

ImageItem Class Definition

ImageItem Class Implementation

Line Edits Example

Window Class Definition

Window Class Implementation

A standard ActiveX and the "simple" ActiveQt widget

Simple Example (ActiveQt)

Qt Assistant Manual

Introduction

The One-Minute Guide to Using Qt Assistant

Qt Assistant in More Detail

The Toolwindows

The Documentation Window

The Toolbar

The Menus

The File Menu

The Edit Menu

The View Menu

The Go Menu

The Bookmarks Menu

The Dialogs

The Print Dialog

The Preferences Dialog

The Find Text Control

Full Text Searching

Using Qt Assistant as custom help browser

Customizing Qt Assistant

Modifying the Qt Assistant with command line options

Documentation Help collection tags

Using Qt Assistant remotely

Compatibility with Old Formats

Cross-Compiling Qt for Embedded Linux Applications

Step 1: Set the Cross-Compiler's Path

Step 2: Create a Target Specific qmake Specification

Step 3: Provide Architecture Specific Files

Step 4: Provide Hardware Drivers

Step 5: Build the Target Specific Executable

Dynamic Layouts Example

Local Fortune Client Example

Cleanlooks Style Widget Gallery

Chart Example

Editable Tree Model

Overview

Design

TreeItem Class Definition

TreeItem Class Implementation

TreeModel Class Definition

TreeModel Class Implementation

Hello GL ES Example

Using QGLWidget

Using OpenGL ES rendering commands

Porting OpenGL to OpenGL ES

Using QGLPainter

Summary

Tool Tips Example

SortingBox Class Definition

SortingBox Class Implementation

ShapeItem Class Definition

ShapeItem Class Implementation

Introduction to D-Bus

Introduction

The Buses

Concepts

Messages

Service Names

Object Paths

Interfaces

Cheat Sheet

Further Reading

Qt Linguist Manual

Overview of the Translation Process

Qt Linguist Manual: Release Manager

Qt Project Files

lupdate

lrelease

Missing Translations

Qt Linguist Manual: Translators

The One Minute Guide to Using Qt Linguist

Qt Linguist's Main Window

Context List

String List

Translation Area

Phrases and Guesses Window

Source Code Window

Warnings Window

Common Tasks

Leaving a Translation for Later

Phrases That Require Multiple Translations Depending on Context

Changing Keyboard Accelerators

Dealing with Phrases That Contain Variables

Reusing Translations

Showing Auxiliary Translations

Changing the Target Locale

Phrase Books

Creating and Editing Phrase Books

Shortcuts for Editing Phrase Books

Batch Translation

Validation

Form Preview

Qt Linguist Reference

Message States

Context States

File Types

The Menu Bar

The Toolbar

Qt Linguist Manual: Programmers

Making the Application Translation-Aware

Creating Translation Files

Loading Translations

Making the Application Translate User-Visible Strings

Distinguishing Identical Strings That Require Different Translations

Helping the Translator with Navigation Information

Handling Plural Forms

Coping With C++ Namespaces

Translating Text That is Outside of a QObject Subclass

Using QCoreApplication::translate()

Using QT_TR_NOOP() and QT_TRANSLATE_NOOP()

Tutorials

Qt Linguist Manual: TS File Format

Porting to Qt 4

Casting and Object Types

Type Names

Enum Values

Properties

Explicit Sharing

Painting and Redrawing Widgets

QAccel

QAccessibleInterface

QAccessibleTitleBar

QAction

QActionGroup

QApplication

QAquaStyle

QAsciiCache<T>

QAsciiDict<T>

QAsyncIO

QBackInsertIterator

QBitArray

QButton

QButtonGroup

QByteArray

QCache<T>

QCanvas

QColor

QColorGroup

QColorDrag

QComboBox

QCString

QCustomEvent

QDataBrowser

QDataPump

QDataSink

QDataSource

QDataTable

QDataView

QDateEdit

QDateTimeEditBase

QDateTimeEdit

QDeepCopy<T>

QDial

QDict<T>

QDir

QDns

QDockArea

QDockWindow

QDragObject

QDropSite

QEditorFactory

QEventLoop

QFileDialog

QFocusData

QFocusEvent

QFont

QFrame

QFtp

QGLayoutIterator

QGrid

QGridLayout

QGridView

QGroupBox

QHBox

QHeader

QHGroupBox

QHttp

QIconFactory

QIconSet

QIconView

QImageDrag

QImageIO

QIntCache<T>

QIntDict<T>

QIODevice

QIODeviceSource

QLabel

QLayout

QLayoutIterator

QLineEdit

QListBox

QListView

QLocalFs

QMainWindow

QMemArray<T>

QMenuBar

QMenuData

QMessageBox

QMimeSourceFactory

QMovie

QMultiLineEdit

QNetworkProtocol

QObject

QObjectDictionary

QObjectList

QPaintDevice

QPaintDeviceMetrics

QPainter

QPicture

QPixmap

QPointArray

QPopupMenu

QPrinter

QProcess

QProgressBar

QProgressDialog

QPtrCollection<T>

QPtrDict<T>

QPtrList<T>

QPtrQueue<T>

QPtrStack<T>

QPtrVector<T>

QPushButton

QRangeControl

QRegExp

QRegion

QScrollBar

QScrollView

QServerSocket

QSettings

QShared

QSignal

QSimpleRichText

QSlider

QSocket

QSocketDevice

QSortedList

QSplitter

QSpinBox

QSqlCursor

QSqlDatabase

QSqlEditorFactory

QSqlError

QSqlFieldInfo

QSqlForm

QSqlPropertyMap

QSqlQuery

QSqlRecord

QSqlRecordInfo

QSqlSelectCursor

QStoredDrag

QStr(I)List

QStr(I)Vec

QString

QStringList

QStyle

QStyleSheet

QSyntaxHighlighter

QTabBar

QTabDialog

QTabWidget

QTable

QTextCodec

QTextDrag

QTextEdit

QTextIStream

QTextOStream

QTextOStreamIterator

QTextStream

QTextView

QTimeEdit

QTimer

QToolBar

QToolButton

QToolTip

QUriDrag

QUrl

QUrlOperator

QValueList<T>

QValueVector<T>

QVariant

QVBox

QVGroupBox

QWhatsThis

QWidget

QWidgetFactory

QWidgetIntDict

QWidgetList

QWidgetPlugin

QWidgetStack

QWizard

QWorkspace

Porting to Qt 4 - Virtual Functions

Virtual Functions

Qt for Embedded Linux

Trolltech website

Bug Report Form

Third-Party Tools

Qt Solutions

Books about Qt Programming

GUI Programming with Qt 3

Qt Homepage

Visual Studio Integration

Calendar Widget

QtWizard

CORBA Framework

Window Menu

Customer Success Stories

Developer Zone

Downloads

FAQs

License FAQ

Free Software and Contributions

Qt Licensing Overview

Qt License Pricing

How to Order

Platform Support Policy

Product Overview

Qt 4 Platforms Overview

Qt 4 Supported Platforms

Qtopia

Qt Quarterly

Task Tracker

Trolltech Embedded Technology

Trolltech Mailing Lists

Whitepapers

QtCanvas

ModelTest

Qt Script for Applications (QSA)

Table Model Example

Special-Purpose Global Functions Exported by Qt

void qt_set_library_config_file(const QString &fileName)

void qt_set_sequence_auto_mnemonic(bool enable)

void qt_x11_wait_for_window_manager(QWidget *widget)

void qt_mac_secure_keyboard(bool enable)

void qt_mac_set_dock_menu(QMenu *menu)

void qt_mac_set_menubar_icons(bool enable)

void qt_mac_set_menubar_merge(bool enable)

void qt_mac_set_native_menubar(bool enable)

void qt_mac_set_dock_menu(QMenu *menu)

void qt_mac_set_press_and_hold_context(bool enable)

Events and Event Filters

How Events are Delivered

Event Types

Event Handlers

Event Filters

Sending Events

Qt for Embedded Linux Display Management

Available Drivers

Specifying a Driver

Context2D Example

Moving from Qt 3 to Qt 4

Qt 3 Features to Avoid

Qt Designer

Menu Items (QMenuItem)

Pointer-Based Classes (QPtr*)

Other Collection Classes (QStrList, Q*Dict)

Memory Arrays (QMemArray)

URL Operations (QUrlOperator)

SQL Cursors (QSqlCursor)

Domain Name Service (QDns)

Wizard Dialogs (QWizard)

Abstract Grid Views (QGridView)

Specialized Scrolling Views

Significantly Changed Features

Drag and Drop

Extensive Customization of Item Views

Double Buffering

Data-Aware Forms

Dock Windows and Areas

Custom Styles

Standard Accelerator Keys

Text Finder Example

Setting Up The Resource File

TextFinder Class Definition

TextFinder Class Implementation

Function

Digital Clock Example

DigitalClock Class Definition

DigitalClock Class Implementation

Query Model Example

Accessibility

Introduction

Architecture

Accessibility in Qt

The Accessible Object Tree

The Static QAccessible Functions

Implementing Accessibility

The QAccessibleObject and QAccessibleWidget Convenience Classes

QAccessibleWidget Example

Handling Action Requests from Clients

Implementing Accessible Plugins

Implementing Interface Factories

The Scribe Classes

Overview of Scribe

The Document Interface

Document Structure

Editing and Content Creation

Document Layout

Example Code

Manipulating Rich Text

Plain Text Layout

Printing Features

Comparison with Qt 3

Scribble Example

ScribbleArea Class Definition

ScribbleArea Class Implementation

MainWindow Class Definition

MainWindow Class Implementation

Pixelator Example

ImageModel Class Definition

ImageModel Class Implementation

PixelDelegate Class Definition

PixelDelegate Class Implementation

Using The Custom Delegate

Windows CE - Introduction to using Qt

Required tools

Installing Qt

Building your own applications

Running the application

Meta-Object System

Thread Support in Qt 4

General Overview

Comparison with Qt 3

An Overview of Qt's Examples

Widgets

Dialogs

Main Windows

Layouts

Painting

Item Views

Graphics View

Rich Text

Tools

Desktop

Drag and Drop

Threads

Network

XML

XML Patterns: XQuery & XPath

OpenGL

SQL

Qt Assistant

Qt Designer

UiTools

Qt Linguist

Qt Script

Qt for Embedded Linux

ActiveQt

Another Source of Examples

qmake Manual

Getting Started

Table of Contents

Using qmake

Describing a Project

Building a Project

Using Precompiled Headers

qmake Project Files

Project File Elements

Variables

Comments

Built-in Functions and Control Flow

Project Templates

General Configuration

Declaring Qt Libraries

Configuration Features

Declaring Other Libraries

Running qmake

Command-Line Options

Syntax

Options

Makefile Mode Options

Project Mode Options

qmake Platform Notes

Mac OS X

Source and Binary Packages

Using Frameworks

Creating Frameworks

Creating Universal Binaries

Creating and Moving Xcode Projects

Windows

Creating Visual Studio Project Files

Visual Studio 2005 Manifest Files

qmake Reference

Variable Reference

Function Reference

Frequently Used Variables

Environment Variables and Configuration

qmake Variable Reference

CONFIG

DEFINES

DEF_FILE

DEPENDPATH

DEPLOYMENT

DESTDIR

DESTDIR_TARGET

DLLDESTDIR

DISTFILES

DSP_TEMPLATE

FORMS

FORMS3

HEADERS

INCLUDEPATH

INSTALLS

LEXIMPLS

LEXOBJECTS

LEXSOURCES

LIBS

LITERAL_HASH

MAKEFILE

MAKEFILE_GENERATOR

MOC_DIR

OBJECTS

OBJECTS_DIR

OBJMOC

POST_TARGETDEPS

PRE_TARGETDEPS

PRECOMPILED_HEADER

QMAKE

QMAKESPEC

QMAKE_APP_FLAG

QMAKE_APP_OR_DLL

QMAKE_AR_CMD

QMAKE_BUNDLE_DATA

QMAKE_BUNDLE_EXTENSION

QMAKE_CC

QMAKE_CFLAGS_DEBUG

QMAKE_CFLAGS_MT

QMAKE_CFLAGS_MT_DBG

QMAKE_CFLAGS_MT_DLL

QMAKE_CFLAGS_MT_DLLDBG

QMAKE_CFLAGS_RELEASE

QMAKE_CFLAGS_SHLIB

QMAKE_CFLAGS_THREAD

QMAKE_CFLAGS_WARN_OFF

QMAKE_CFLAGS_WARN_ON

QMAKE_CLEAN

QMAKE_CXX

QMAKE_CXXFLAGS

QMAKE_CXXFLAGS_DEBUG

QMAKE_CXXFLAGS_MT

QMAKE_CXXFLAGS_MT_DBG

QMAKE_CXXFLAGS_MT_DLL

QMAKE_CXXFLAGS_MT_DLLDBG

QMAKE_CXXFLAGS_RELEASE

QMAKE_CXXFLAGS_SHLIB

QMAKE_CXXFLAGS_THREAD

QMAKE_CXXFLAGS_WARN_OFF

QMAKE_CXXFLAGS_WARN_ON

QMAKE_DISTCLEAN

QMAKE_EXTENSION_SHLIB

QMAKE_EXT_MOC

QMAKE_EXT_UI

QMAKE_EXT_PRL

QMAKE_EXT_LEX

QMAKE_EXT_YACC

QMAKE_EXT_OBJ

QMAKE_EXT_CPP

QMAKE_EXT_H

QMAKE_FAILED_REQUIREMENTS

QMAKE_FILETAGS

QMAKE_FRAMEWORK_BUNDLE_NAME

QMAKE_FRAMEWORK_VERSION

QMAKE_INCDIR

QMAKE_INCDIR_OPENGL

QMAKE_INCDIR_QT

QMAKE_INCDIR_THREAD

QMAKE_INCDIR_X11

QMAKE_LFLAGS

QMAKE_LFLAGS_CONSOLE

QMAKE_LFLAGS_CONSOLE_DLL

QMAKE_LFLAGS_DEBUG

QMAKE_LFLAGS_PLUGIN

QMAKE_LFLAGS_QT_DLL

QMAKE_LFLAGS_RELEASE

QMAKE_LFLAGS_SHAPP

QMAKE_LFLAGS_SHLIB

QMAKE_LFLAGS_SONAME

QMAKE_LFLAGS_THREAD

QMAKE_LFLAGS_WINDOWS

QMAKE_LFLAGS_WINDOWS_DLL

QMAKE_LIBDIR

QMAKE_LIBDIR_FLAGS

QMAKE_LIBDIR_OPENGL

QMAKE_LIBDIR_QT

QMAKE_LIBDIR_X11

QMAKE_LIBS

QMAKE_LIBS_CONSOLE

QMAKE_LIBS_OPENGL

QMAKE_LIBS_OPENGL_QT

QMAKE_LIBS_QT

QMAKE_LIBS_QT_DLL

QMAKE_LIBS_QT_OPENGL

QMAKE_LIBS_QT_THREAD

QMAKE_LIBS_RT

QMAKE_LIBS_RTMT

QMAKE_LIBS_THREAD

QMAKE_LIBS_WINDOWS

QMAKE_LIBS_X11

QMAKE_LIBS_X11SM

QMAKE_LIB_FLAG

QMAKE_LINK_SHLIB_CMD

QMAKE_POST_LINK

QMAKE_PRE_LINK

QMAKE_LN_SHLIB

QMAKE_MAC_SDK

QMAKE_MACOSX_DEPLOYMENT_TARGET

QMAKE_MAKEFILE

QMAKE_MOC_SRC

QMAKE_QMAKE

QMAKE_QT_DLL

QMAKE_RESOURCE_FLAGS

QMAKE_RUN_CC

QMAKE_RUN_CC_IMP

QMAKE_RUN_CXX

QMAKE_RUN_CXX_IMP

QMAKE_TARGET

QMAKE_UIC

QT

QTPLUGIN

QT_VERSION

QT_MAJOR_VERSION

QT_MINOR_VERSION

QT_PATCH_VERSION

RC_FILE

RCC_DIR

REQUIRES

RES_FILE

SIGNATURE_FILE

SOURCES

SRCMOC

SUBDIRS

TARGET

TARGET_EXT

TARGET_x

TARGET_x.y.z

TEMPLATE

TRANSLATIONS

UICIMPLS

UICOBJECTS

UI_DIR

UI_HEADERS_DIR

UI_SOURCES_DIR

VERSION

VER_MAJ

VER_MIN

VER_PAT

VPATH

YACCIMPLS

YACCOBJECTS

YACCSOURCES

qmake Function Reference

basename(variablename)

CONFIG(config)

contains(variablename, value)

count(variablename, number)

dirname(file)

error(string)

eval(string)

exists(filename)

find(variablename, substr)

for(iterate, list)

include(filename)

infile(filename, var, val)

isEmpty(variablename)

join(variablename, glue, before, after)

member(variablename, position)

message(string)

prompt(question)

quote(string)

replace(string, old_string, new_string)

sprintf(string, arguments...)

system(command)

unique(variablename)

warning(string)

Configuring qmake's Environment

Properties

QMAKESPEC

INSTALLS

Cache File

Library Dependencies

File Extensions

Customizing Makefile Output

qmake Advanced Usage

Operators

Scopes

Scopes and Conditions

Configuration and Scopes

Platform Scope Values

Variables

Variable Processing Functions

Conditional Functions

Adding New Configuration Features

Using Precompiled Headers

Adding Precompiled Headers to Your Project

Contents of the Precompiled Header File

Example:

Project Options

Notes on Possible Issues

Example Project

qmake Tutorial

Starting off Simple

Making an Application Debuggable

Adding Platform-Specific Source Files

Stopping qmake If a File Doesn't Exist

Checking for More than One Condition

qmake Common Projects

Building an Application

The app Template

Building a Library

The lib Template

Building a Plugin

Building a Qt Designer Plugin

Building and Installing in Debug and Release Modes

Building in Both Modes

Installing in Both Modes

Installing Qt for Embedded Linux

Step 1: Installing the License File (commercial editions only)

Step 2: Unpacking the Archive

Step 3: Building the Library

Step 4: Adjusting the Environment Variables

Step 5: Building the Virtual Framebuffer

Windows Style Widget Gallery

Adding an Accelerated Graphics Driver to Qt for Embedded Linux

Step 1: Create a Custom Screen

Step 2: Implement a Custom Raster Paint Engine

Step 3: Make the Paint Device Aware of Your Paint Engine

Step 4: Make the Window Surface Aware of Your Paint Device

Step 5: Enable Creation of an Instance of Your Window Surface

The Qt Resource System

Resource Collection Files ()

External Binary Resources

Compiled-In Resources

Using Resources in the Application

Item Views Puzzle Example

Application Example

MainWindow Class Definition

MainWindow Class Implementation

The main() Function

The Resource File

Config Dialog Example

Qutlook Example (ActiveQt)

Asynchronous Run

Running a Function in a Separate Thread

Passing Arguments to the Function

Returning Values from the Function

Additional API Features

Using Member Functions

Using Bound Function Arguments

Simple DOM Model Example

Design and Concepts

DomModel Class Definition

DomItem Class Definition

DomItem Class Implementation

DomModel Class Implementation

Basic Properties of The Model

Navigating The Document

Implementation Notes

Running Qt for Embedded Linux Applications

Using a Single Display

Using Multiple Displays

Command Line Options

SDI Example

Custom Completer Example

Setting Up The Resource File

TextEdit Class Definition

TextEdit Class Implementation

MainWindow Class Definition

MainWindow Class Implementation

Function

ECMAScript Reference

The Global Object

Value Properties

Function Properties

Constructor Properties

Object Objects

Object Prototype Object

Function Objects

Function Prototype Object

Function Properties

Array Objects

Array Prototype Object

Function Properties

String Objects

String Prototype Object

Function Properties

Boolean Objects

Boolean Prototype Object

Function Properties

Number Objects

Number Prototype Object

Function Properties

The Math Object

Value Properties

Function Properties

Date Objects

Date Prototype Object

Function Properties

RegExp Objects

RegExp Prototype Object

Function Properties

Error Objects

Error Prototype Object

Value Properties

Function Properties

Class Inheritance Hierarchy

QtWebKit Module

Configuring the Build Process

Architecture

License Information

40000 Chips

Qt Demonstrations

Painting

Item Views

SQL

Rich Text

Main Window

Graphics View

Tools

QtWebKit

Phonon

Plug & Paint Example

The Plugin Interfaces

The MainWindow Class

The PaintArea Class

The PluginDialog Class

Importing Static Plugins

Plug & Paint Basic Tools Example

Declaration of the Plugin Class

Implementation of the Brush Interface

Implementation of the Shape Interface

Implementation of the Filter Interface

Exporting the Plugin

The .pro File

Plug & Paint Extra Filters Example

Wiggly Example

Dialog Class Definition

Dialog Class Implementation

WigglyWidget Class Definition

WigglyWidget Class Implementation

Custom Script Class Example

ByteArray Class In Use

ByteArray Class Implementation

ByteArray Iterator Implementation

ByteArray Prototype Implementation

Transformations Example

Transformation Operations

RenderArea Class Definition

RenderArea Class Implementation

Window Class Definition

Window Class Implementation

Summary

Books about GUI Design

Buying these Books from Amazon.com

Broadcast Sender Example

Simple Widget Mapper Example

Shared Memory Example

QXmlStream Bookmarks Example

XbelWriter Class Definition

XbelWriter Class Implementation

XbelReader Class Definition

XbelReader Class Implementation

MainWindow Class Definition

MainWindow Class Implementation

Function

Qt's Main Classes

Framebuffer Object Example

Qt Editions

SVG Viewer Example

The dumpdoc Tool (ActiveQt)

MDI Example

Trademarks

The Interview Framework

Overview of The Model/View Architecture

Model/View Classes

Example Code

Sharing a Model Between Views

Creating a Custom Model

What's Changed Since Qt 3?

Qt/Mac-Specific Issues

GUI Applications

Painting

Library Support

Qt libraries as frameworks

Bundle-Based Libraries

Combining Libraries

Initialization Order

Compiler Settings

Compile-Time Flags

Mac OS X Native API Access

Accessing the Bundle Path

Translating the Application Menu and Native Dialogs

User Interface

Right-Mouse Clicks

Menu Bar

Special Keys

Limitations

Menu Actions

Native Widgets

All Overviews and HOWTOs

SQL Browser

Secure Socket Client Example

XML Stream Lint Example

Basic Operation

Macros for Defining Plugins

Internationalization with Qt

Step by Step

Use QString for All User-Visible Text

Use tr() for All Literal Text

Use QKeySequence() for Accelerator Values

Use QString::arg() for Dynamic Text

Produce Translations

Support for Encodings

Localize

Dynamic Translation

Translating Non-Qt Classes

System Support

Unix/X11

Windows

Note about Locales on X11

Relevant Qt Classes

Sliders Example

Window Class Definition

Window Class Implementation

SlidersGroup Class Definition

SlidersGroup Class Implementation

Q Public License (QPL)

Browser

Styles Example

NorwegianWoodStyle Class Definition

NorwegianWoodStyle Class Implementation

WidgetGallery Class

Session Management

Shutting a Session Down

Protocols and Support on Different Platforms

Getting Session Management to Work with Qt

Testing and Debugging Session Management

Menus Example

MainWindow Class Definition

MainWindow Class Implementation

Installation

Installing Qt/X11

Installing Qt/Windows

Installing Qt/Mac

Installing Qt/Windows CE

Qt/Windows Requirements

Qt/Mac Requirements

Qt/X11 Requirements

Layout Classes

Horizontal, Vertical, and Grid Layouts

Adding Widgets to a Layout

Stretch Factors

Custom Widgets in Layouts

Layout Issues

Manual Layout

Writing Custom Layout Managers

The Header File ()

The Implementation File ()

Further Notes

Qt Widget Hierarchy

Hierarchy Example (ActiveQt)

DOM Bookmarks Example

Default Prototypes Example

Echo Plugin Example

EchoWindow Class Definition

EchoWindow Class Implementation

EchoInterface Class Definition

EchoPlugin Class Definition

EchoPlugin Class Implementation

The function

The Profiles

Further reading and examples

Text Edit

How to Create Qt Plugins

The Higher-Level API: Writing Qt Extensions

The Lower-Level API: Extending Qt Applications

Loading and Verifying Plugins Dynamically

The Build Key

Static Plugins

The Plugin Cache

Debugging Plugins

Using the Meta-Object Compiler (moc)

Usage

Writing Make Rules for Invoking

Command-Line Options

Diagnostics

Limitations

Multiple Inheritance Requires QObject to Be First

Function Pointers Cannot Be Signal or Slot Parameters

Enums and Typedefs Must Be Fully Qualified for Signal and Slot Parameters

Type Macros Cannot Be Used for Signal and Slot Parameters

Nested Classes Cannot Have Signals or Slots

Signal/Slot return types cannot be references

Only Signals and Slots May Appear in the and Sections of a Class

QtScript Module

Configuring the Build Process

Language Overview

Basic Usage

Making a QObject Available to the Script Engine

Using Signals and Slots

Signal to Function Connections

Signal to Member Function Connections

Signal to Named Member Function Connections

Error Handling

Emitting Signals from Scripts

Overloaded Signals and Slots

Accessing Properties

Accessing Child QObjects

Controlling QObject Ownership

Customizing Access to the QObject

Making a QObject-based Class New-able from a Script

Conversion Between QtScript and C++ Types

Default Conversion from Qt Script to C++

Default Conversion from C++ to Qt Script

How to Design and Implement Application Objects

Making a C++ object available to Scripts Written in QtScript

Making C++ Class Member Functions Available in QtScript

Making C++ Class Properties Available in QtScript

Reacting to C++ Objects Signals in Scripts

Design of Application Objects

Returning QObject Pointers

Making Use of Prototype-Based Inheritance

Prototype Objects and Shared Properties

Defining Classes in a Prototype-Based Universe

Prototype-Based Programming with the QtScript C++ API

Implementing Prototype Objects for Value-based Types

Implementing Constructors for Value-based Types

Defining Custom Script Classes with QScriptClass

Error Handling and Debugging Facilities

Redefining print()

Using QtScript Extensions

ECMAScript Compatibility

QtScript Extensions to ECMAScript

Plastique Style Widget Gallery

Accelerated Graphics Driver Example

Step 1: Creating a Custom Graphics Driver

SvgalibScreen Class Implementation

Step 2: Implementing a Custom Raster Paint Engine

Step 3: Making the Widgets Aware of the Custom Paint Engine

Implementing a Custom Paint Device

Implementing a Custom Window Surface

Adjusting the Graphics Driver

Qt Object Model

Window System Specific Notes

Qt/X11

Qt/Windows

Qt/Mac OS X

Qt for Embedded Linux

I18N Example

Local Fortune Server Example

Double Buffered Graphics Driver Example

Step 1: Creating a Custom Graphics Driver

Step 2: Implementing the Back Buffer

Device initializing and shutdown

Drawing to the back buffer

Displaying the buffer on the screen

Step 3: Creating the Driver Plugin

The Arthur Paint System

Architecture

A Look Back at Qt 3

How Painting is Done in Qt 4

New Features in the Qt 4 Paint System

Gradient Brushes

Alpha-Blended Drawing

QPainter and QGLWidget

Anti-Aliased Edges

Extensive Use of Native Graphics Operations

Painter Paths

Widget Double-Buffering

Pen and Brush Transformation

Custom Filled Pens

QImage as a Paint Device

SVG Rendering Support

Pixel Buffers 2 Example

Color Editor Factory Example

Window Class Implementation

ColorListEditor Definition

ColorListEditor Implementation

Further Customization of Item View Editors

Affine Transformations

Task Menu Extension Example

The Project File: taskmenuextension.pro

TicTacToePlugin Class Definition

TicTacToePlugin Class Implementation

TicTacToeTaskMenuFactory Class Definition

TicTacToeTaskMenuFactory Class Implementation

TicTacToeTaskMenu Class Definition

TicTacToeTaskMenu Class Implementation

TicTacToeDialog Class Definition

TicTacToeDialog Class Implementation

TicTacToe Class Definition

Regular Expressions Example

Fortune Server Example

Compiler Notes

GCC (most platforms)

GCC on Windows (MinGW)

gcc 4.0.0

HP-UX

Solaris

Mac OS X

gcc (GCC) 3.4.6 (Debian 3.4.6-5) on AMD64 (x86_64)

HP ANSI C++ (aCC)

Intel C++ Compiler

Intel C++ Compiler for Linux

Known Issues with Intel C++ Compiler for Linux

Intel C++ Compiler (Windows, Altix)

MIPSpro (IRIX)

Forte Developer / Sun Studio (Solaris)

Sun Studio

Sun WorkShop 5.0

Visual Studio (Windows)

IBM xlC (AIX)

VisualAge C++ for AIX, Version 6.0

Spin Box Delegate Example

SpinBoxDelegate Class Definition

SpinBoxDelegate Class Implementation

The Main Function

GNU General Public License (GPL)

The GNU General Public License (Version 2)

The GNU General Public License (Version 3)

Additional Exception for OpenSSL

Analog Clock Example

AnalogClock Class Definition

AnalogClock Class Implementation

SIP Dialog Example

Dialog Class Definition

Dialog Class Implementation

The function

HTTP Example

Address Book Tutorial

Address Book 1 - Designing the User Interface

Qt Programming - Subclassing

Defining the AddressBook Class

Implementing the AddressBook Class

Running the Application

Address Book 2 - Adding Addresses

Defining the AddressBook Class

Implementing the AddressBook Class

Address Book 3 - Navigating between Entries

Defining the AddressBook Class

Implementing the AddressBook Class

Address Book 4 - Editing and Removing Addresses

Defining the AddressBook Class

Implementing the AddressBook Class

Updating the User Interface

Address Book 5 - Adding a Find Function

Defining the FindDialog Class

Implementing the FindDialog Class

Defining the AddressBook Class

Implementing the AddressBook Class

Address Book 6 - Loading and Saving

Defining the AddressBook Class

Implementing the AddressBook Class

Address Book 7 - Additional Features

Defining the AddressBook Class

Implementing the AddressBook Class

Basic Sort/Filter Model Example

Motif Style Widget Gallery

Troll Print Example

Line by Line Walkthrough

Running Troll Print 1.0 in English and in Portuguese

Troll Print 1.1

Qt/Mac is Mac OS X Native

The Global Menu Bar

Aqua

Dock

Accessiblity

Development Tools

freedesktop.org

XEmbed Specification

Icon Themes Specification

Common Unix Printing System (CUPS)

Desktop Entry Specification

The K Desktop Environment

GNOME

GNU Emacs

Amnesty International

About SVG

SVG color keyword names

SVG Working Group

Mobile SVG Profiles

SVG 1.2 Tiny

SVG 1.2 Tiny Static Features

RFC 1179

RFC 1738

RFC 1928

RFC 1929

RFC 2045

RFC 3174

RFC 3491

RFC 3986

Dependency Walker

ECMA-262

JavaScript: The Definitive Guide

QtSharedMemory

WebKit Open Source Project

C++ GUI Programming with Qt 4, 2nd Edition

Testing the Linux Framebuffer

Chat Example

Elastic Nodes Example

The Graphics View Framework

The Graphics View Architecture

The Scene

The View

The Item

The Graphics View Coordinate System

Item Coordinates

Scene Coordinates

View Coordinates

Coordinate Mapping

Key Features

Zooming and rotating

Printing

Drag and Drop

Cursors and Tooltips

Animation

OpenGL Rendering

Item Groups

Widgets and Layouts

QGraphicsWidget

QGraphicsLayout

Embedded Widget Support

Big5 Text Codec

Big5-HKSCS Text Codec

EUC-JP Text Codec

EUC-KR Text Codec

GBK Text Codec

ISO 2022-JP (JIS) Text Codec

Shift-JIS Text Codec

TSCII Text Codec

makeqpf

Calendar Widget Example

Window Class Definition

Window Class Implementation

Painter Paths Example

Window Class Definition

Window Class Implementation

RenderArea Class Definition

RenderArea Class Implementation

About Trolltech

Software that Makes Sense

History

Contact Information

Semaphores Example

Global Variables

Producer Class

Consumer Class

The main() Function

Books Demonstration

The dumpcpp Tool (ActiveQt)

Qt Reference Documentation (Open Source Edition)

Style Sheet Example

Pixel Buffers Example

QtXmlPatterns Module

Introduction

Why use XQuery?

Using QtXmlPatterns

C++ API

Configuring the Build Process

Command line utility

XQuery HOWTO

Qt's and XQuery's Data Model

Integrating with Custom Data

More on Custom Data

Security Considerations

Query Injection

Denial of Service Attacks

Features and Conformance

Conformance

Resource Loading

Calculator Builder Example

Preparation

CalculatorForm Class Definition

CalculatorForm Class Implementation

Diagram Scene Example

MainWindow Class Definition

MainWindow Class Implementation

DiagramScene Class Definition

DiagramScene Class Implementation

DiagramItem Class Definition

DiagramItem Class Implementation

DiagramTextItem Class Definition

DiagramTextItem Implementation

Arrow Class Definition

Arrow Class Implementation

Qt Style Sheets

Overview

The Style Sheet Syntax

Style Rules

Selector Types

Sub-Controls

Pseudo-States

Conflict Resolution

Cascading

Inheritance

Widgets inside C++ namespaces

Setting QObject properties

Qt Designer Integration

Customizing Qt Widgets Using Style Sheets

The Box Model

Sub-controls

Qt Style Sheets Reference

List of Stylable Widgets

List of Properties

List of Icons

List of Property Types

List of Pseudo-States

List of Sub-Controls

Qt Style Sheets Examples

Style Sheet Usage

Customizing the Foreground and Background Colors

Customizing Using Dynamic Properties

Customizing a QPushButton Using the Box Model

Customizing the QPushButton's Menu Indicator Sub-Control

Complex Selector Example

Customizing specific widgets

Customizing QAbstractScrollArea

Customizing QCheckBox

Customizing QComboBox

Customizing QDockWidget

Customizing QFrame

Customizing QGroupBox

Customizing QHeaderView

Customizing QLineEdit

Customizing QListView

Customizing QMainWindow

Customizing QMenu

Customizing QMenuBar

Customizing QProgressBar

Customizing QPushButton

Customizing QRadioButton

Customizing QScrollBar

Customizing QSizeGrip

Customizing QSlider

Customizing QSpinBox

Customizing QSplitter

Customizing QStatusBar

Customizing QTabWidget and QTabBar

Customizing QTableView

Customizing QToolBar

Customizing QToolBox

Customizing QToolButton

Customizing QToolTip

Customizing QTreeView

Common mistakes

QPushButton and images

QAxServer Module

Using the Library

Out-of-Process vs. In-Process

Typical Errors During the Post-Build Steps

The Server Executable Crashes

The Server Executable Is Not a Valid Win32 Application

"Unable to locate DLL"

"Cannot open file ..."

Implementing Controls

Data Types

Sub-Objects

Property Notification

Serving Controls

Typical Compile-Time Problems

"No overloaded function takes 2 parameters"

"Syntax error: bad suffix on number"

"Unresolved external symbol _ucm_instantiate"

"_ucm_initialize already defined in ..."

Distributing QAxServer Binaries

Installing Stand-Alone Servers

Installing In-Process Servers

Distributing Servers over the Internet

Using the Controls

Supported and Unsupported ActiveX Clients

Supported Clients

Unsupported Clients

Typical Runtime Errors

The Server Does Not Respond

The Object Cannot Be Created

Debugging Runtime Errors

Class Information and Tuning

Developing Licensed Components

More Interfaces

Recipes Example

Sample Buffers Example

Qt for Embedded Linux Performance Tuning

Programming Style

Static vs. Dynamic Linking

Alternative Memory Allocation

Bypassing the Backing Store

2D Painting Example

Overview

Helper Class Definition

Helper Class Implementation

Widget Class Definition

Widget Class Implementation

GLWidget Class Definition

GLWidget Class Implementation

Window Class Definition

Window Class Implementation

Running the Example

Windows XP Style Widget Gallery

Order Form Example

DetailsDialog Definition

DetailsDialog Implementation

MainWindow Definition

MainWindow Implementation

Function

Undo Framework Example

MainWindow Class Definition

MainWindow Class Implementation

AddCommand Class Definition

AddCommand Class Implementation

DeleteCommand Class Definition

DeleteCommand Class Implementation

MoveCommand Class Definition

MoveCommand Class Implementation

DiagramScene Class Definition

The Function

Concurrent Filter and Filter-Reduce

Concurrent Filter

Concurrent Filter-Reduce

Additional API Features

Using Iterators instead of Sequence

Blocking Variants

Using Member Functions

Using Function Objects

Using Bound Function Arguments

Model/View Programming

Related Examples

An Introduction to Model/View Programming

The Model/View Architecture

Models

Views

Delegates

Sorting

Convenience Classes

The Model/View Components

Using Models and Views

Introduction

Using Views with an Existing Model

Model Classes

Basic Concepts

Model Indexes

Rows and Columns

Parents of Items

Item Roles

Summary of Concepts

Using Model Indexes

Further Reading

View Classes

Concepts

Using an Existing View

Using a Model

Using Multiple Views onto the Same Model

Handling Selections of Items

Sharing Selections Between Views

Delegate Classes

Concepts

Using an Existing Delegate

A Simple Delegate

Providing an Editor

Submitting Data to the Model

Updating the Editor's Geometry

Editing Hints

Handling Selections in Item Views

Concepts

Using a Selection Model

Selecting Items

Reading the Selection State

Updating a Selection

Selecting All Items in a Model

Creating New Models

Introduction

Designing a Model

A Read-Only Example Model

Dimensions of The Model

Model Headers and Data

An Editable Model

Making the Model Editable

Inserting and Removing Rows

Next Steps

Item View Convenience Classes

Overview

List Widgets

Tree Widgets

Table Widgets

Common Features

Hidden Items

Selections

Searching

Using Drag and Drop with Item Views

Overview

Using Convenience Views

Using Model/View Classes

Enabling Drag and Drop for Items

Encoding Exported Data

Inserting Dropped Data into a Model

Decoding Imported Data

Proxy Models

Overview

Using Proxy Models

Customizing Proxy Models

Custom Filtering Models

Custom Sorting Models

Model Subclassing Reference

Introduction

Item Data Handling

Read-Only Access

Editable Items

Resizable Models

Lazy Population of Model Data

Navigation and Model Index Creation

Parents and Children

Drag and Drop Support and MIME Type Handling

MIME Data

Accepting Dropped Data

Convenience Views

Performance Optimization for Large Amounts of Data

Drop Site Example

DropArea Class Definition

DropArea Class Implementation

DropSiteWindow Class Definition

DropSiteWindow Class Implementation

The main() Function

How to Report a Bug

Cached Table Example

TableEditor Class Definition

TableEditor Class Implementation

Macintosh Style Widget Gallery

Fine-Tuning Features in Qt for Embedded Linux

Windows CE OpenGL ES

Introduction

Using OpenGL to Accelerate Normal 2D Painting

Menubar Merging

Menus Example (ActiveQt)

Generic Containers

Introduction

The Container Classes

The Iterator Classes

Java-Style Iterators

STL-Style Iterators

The foreach Keyword

Other Container-Like Classes

Algorithmic Complexity

Growth Strategies

Dock Widgets Example

MainWindow Class Definition

MainWindow Class Implementation

Qt for Embedded Linux and OpenGL

Introduction

Using OpenGL 3D Graphics in Applications

Using OpenGL to Accelerate Normal 2D Painting

Using OpenGL to Implement Window Compositing and Effects

Acceleration Architecture

The Reference Integration

Keyboard Focus

Focus Motion

Tab or Shift+Tab

The User Clicks a Widget

The User Presses a Keyboard Shortcut

The User Rotates the Mouse Wheel

The User Moves the Focus to This Window

Icons Example

QIcon Overview

Overview of the Icons Application

Line-by-Line Walkthrough

IconPreviewArea Class Definition

IconPreviewArea Class Implementation

MainWindow Class Definition

MainWindow Class Implementation

IconSizeSpinBox Class Definition

IconSizeSpinBox Class Implementation

ImageDelegate Class Definition

ImageDelegate Class Implementation

Codecs Example

The Tulip Container Classes

General Overview

Examples

Comparison with Qt 3

QtGui Module

Textures Example

Porting .ui Files to Qt 4

uic Output

Working with uic3

Limitations of uic3

Icons

Custom Widgets

Standard Qt widgets in an HTML page

Wrapper Example (ActiveQt)

Topics

Architecture

Build System

Class and Function Indexes

Codecs

GUI Programming

How To Guides and Learning Resources

Licensing Information

Platform-Specific Notes

Porting Guides

Text Processing

Tutorials

Qt Tutorial

Widgets Tutorial

Address Book Tutorial

Tools for ActiveQt

Scripting with ECMAScript

Threading and Concurrent Programming

Qt for Embedded Linux Character Input

Available Keyboard Drivers

Specifying a Keyboard Driver

Moving from QSA to Qt Script

The Scripting Language

Classes vs. Objects and Properties

Constructors

Member Functions and Prototypes

Inheritance

Static Members

The Built-in Functions and Library

The C++ API of QSA vs Qt Script

Making QObjects Accessible from Scripts

Accessing Non-QObjects

Data Mapping

Desktop Integration

Opening External Resources

System Tray Icons

Desktop Widgets

Torrent Example

License Information

Simple Tree Model Example

Design and Concepts

TreeItem Class Definition

TreeItem Class Implementation

TreeModel Class Definition

TreeModel Class Implementation

Setting Up the Data in the Model

QAxContainer Module

Using the Library

Distributing QAxContainer Applications

Instantiating COM Objects

Typical Error Messages

Requested control could not be instantiated

Accessing the Object API

Generating a C++ Namespace

Call-by-Name

Calling Function Through a Script Engine

Calling a Function Using the Native COM Interfaces

Typical Error Messages

QAxBase::internalInvoke: No such method

Error calling IDispatch member: Non-optional parameter missing

Error calling IDispatch member: Type mismatch in parameter n

QAxScriptManager::call(): No script provides this function

Generic Algorithms

Types of Iterators

Input Iterators

Output Iterators

Forward Iterators

Bidirectional Iterators

Random Access Iterators

Completer Example

The Resource File

DirModel Class Definition

DirModel Class Implementation

MainWindow Class Definition

MainWindow Class Implementation

Function

Relational Table Model Example

SAX Bookmarks Example

Object Trees and Object Ownership

Overview

Construction/Destruction Order of QObjects

Licenses for Code Used in Qt

Licenses for Fonts Used in Qt for Embedded Linux

Adobe Helvetica

Adobe Utopia

Babelfish

Bigelow & Holmes Luxi

Bitstream Charter and Courier

Bitstream Vera

Cursor

DejaVu Fonts

Fixed Fonts

IBM Courier

Micro

Unifont

Wenquanyi

Trolltech GPL Exception Version 1.2

Addendum to the Trolltech GPL Exception Version 1.2

The "Artistic License"

MIT License

Python License (CNRI Python License)

The zlib/libpng License

Drag and Drop Robot Example

Capabilities Example

Window Class Definition

Window Class Implementation

The main() function

Qt Examples

ActiveQt

Desktop

Dialogs

Drag and Drop

Graphics View

Item Views

Layouts

Main Windows

Network

OpenGL

Painting

Phonon Multimedia Framework

Qt Assistant

Qt Designer

Qt Linguist

Qt for Embedded Linux

Qt Script

Rich Text

SQL

Threads

Tools

UiTools

WebKit

Widgets

XML

XML Patterns: XQuery & XPath

Inter-Process Communication

The New Qt Designer

The Current State of Qt Designer

User Interface Features

Editing Features

Plugin Support

Run-Time Support for Forms

Cross-Platform Accessibility Support in Qt 4

General Overview

Example Code

Basic Layouts Example

Dialog Class Definition

Dialog Class Implementation

Creating QtScript Extensions

Porting Qt for Embedded Linux to Another Operating System

Shared Memory and Semaphores

Inter-Application Communication

Screen Management

Sound Management

Event Dispatching

Porting Qt for Embedded Linux to a New Architecture

Hardware Drivers

Atomic Operations

QtDesigner Module

Creating Custom Widget Plugins

Retrieving Access to Qt Designer Components

Creating User Interfaces at Run-Time

Qt for Embedded Linux Architecture

Client/Server Communication

Pointer Handling Layer

Character Input Layer

Graphics Rendering

Drawing on Screen

Qt Designer Manual

Using Qt Designer

Using Forms and Components

Customizing Qt Designer

Figures and Hints

Legal Notices

Getting Started with Qt Designer

Launching Designer

The User Interface

Designing a Component with Qt Designer

Creating a Form

Composing a Dialog

Creating a Layout

Configuring Connections

Qt Designer's Widget Editing Mode

Managing Forms

Editing a Form

The Property Editor

Dynamic Properties

The Object Inspector

Layouts

Applying and Breaking Layouts

Setting A Top Level Layout

Horizontal and Vertical Layouts

The Grid Layout

Splitter Layouts

The Form Layout

Shortcut Keys

Previewing Forms

Viewing the Form's Code

Saving and Printing the Form

Using Containers in Qt Designer

General Features

Frames

Group Boxes

Stacked Widgets

Tab Widgets

Toolbox Widgets

Dock Widgets

Creating Main Windows in Qt Designer

The Main Window Template

Menus

Toolbars

Actions

Dock Widgets

Qt Designer's Signals and Slots Editing Mode

Connecting Objects

Editing and Deleting Connections

Qt Designer's Buddy Editing Mode

Linking Labels to Buddy Widgets

Removing Buddy Connections

Qt Designer's Tab Order Editing Mode

Setting the Tab Order

Editing Resources with Qt Designer

Defining a Resource File

Using the Resources

Using Stylesheets with Qt Designer

Customizing Qt Designer Forms

Modifying the Form Settings

Using Custom Widgets with Qt Designer

Handling Custom Widgets

Promoting Widgets

User Defined Custom Widgets

Using a Component in Your Application

Compile Time Form Processing

The Direct Approach

The Single Inheritance Approach

The Multiple Inheritance Approach

Run Time Form Processing

The UiTools Approach

Automatic Connections

A Dialog Without Auto-Connect

Widgets and Dialogs with Auto-Connect

Creating Custom Widgets for Qt Designer

Getting Started

Providing an Interface Description

Plugin Requirements

Creating Well Behaved Widgets

Building and Installing the Plugin

Related Examples

Creating Custom Widget Extensions

Extension Types

Creating an Extension

Exposing an Extension to Qt Designer

Creating an Extension Factory

Accessing Qt Designer's Extension Manager

Related Examples

Qt Designer's UI File Format

Implementation of the Recursive Shadow Casting Algorithm in Qt Designer

Spreadsheet

OpenGL for Embedded Systems Example

Introduction

The Class Definitions

The Plugin Class Definition

The Screen Driver Class Definitions

The Window Surface Class Definitions

The Helper Classes

The Class Implementations

The Plugin Class Implementation

The Screen Driver Class Implementations

The window Surface Class Implementations

Qt for Embedded Linux Pointer Handling

Available Drivers

Specifying a Driver

Troubleshooting

Device Files

File Permissions

Container Extension Example

The Project File: containerextension.pro

MultiPageWidgetPlugin Class Definition

MultiPageWidgetPlugin Class Implementation

MultiPageWidgetExtensionFactory Class Definition

MultiPageWidgetExtensionFactory Class Implementation

MultiPageWidgetContainerExtension Class Definition

MultiPageWidgetContainerExtension Class Implementation

MultiPageWidget Class Definition

Windows Vista Style Widget Gallery

Qt 3 Compatibility Classes

Overpainting Example

GLWidget Class Definition

GLWidget Class Implementation

Summary

Implementing Atomic Operations

Calling Qt Functions From Unix Signal Handlers

Tablet Example

MainWindow Class Definition

MainWindow Class Implementation

TabletCanvas Class Definition

TabletCanvas Class Implementation

TabletApplication Class Definition

TabletApplication Class Implementation

The function

Character Map Example

CharacterWidget Class Definition

CharacterWidget Class Implementation

MainWindow Class Definition

MainWindow Class Implementation

The Paint System

Drawing

Filling

Creating a Paint Device

Widget

Image

Pixmap

OpenGL Widget

Pixel Buffer

Framebuffer Object

Picture

Printer

Reading and Writing Image Files

Styling

QtCore Module

Web Browser Example (ActiveQt)

Arthur Plugin

Screenshot Example

Screenshot Class Definition

Screenshot Class Implementation

Tab Dialog Example

TabDialog Class Definition

TabDialog Class Implementation

GeneralTab Class Definition

GeneralTab Class Implementation

PermissionsTab Class Definition

PermissionsTab Class Implementation

ApplicationsTab Class Definition

ApplicationsTab Class Implementation

COM App Example (ActiveQt)

QtUiTools Module

Signals and Slots

Introduction

Signals and Slots

A Small Example

Building the Example

Signals

Slots

Meta-Object Information

A Real Example

Advanced Signals and Slots Usage

Using Qt with 3rd Party Signals and Slots

Framebuffer Object 2 Example

Examples and Demos Launcher

Border Layout Example

Syntax Highlighter Example

Highlighter Class Definition

Highlighter Class Implementation

MainWindow Class Definition

MainWindow Class Implementation

ActiveQt Framework

Fridge Magnets Example

DragWidget Class Definition

DragWidget Class Implementation

DragLabel Class Definition

DragLabel Class Implementation

Deploying Qt Applications

Deploying an Application on Qt/X11

Static Linking

Building Qt Statically

Linking the Application to the Static Version of Qt

Shared Libraries

Building Qt as a Shared Library

Linking the Application to Qt as a Shared Library

Creating the Application Package

Application Dependencies

Additional Libraries

Qt Plugins

Deploying an Application on Qt/Windows

Static Linking

Building Qt Statically

Linking the Application to the Static Version of Qt

Shared Libraries

Building Qt as a Shared Library

Linking the Application to Qt as a Shared Library

Creating the Application Package

Visual Studio 2005

Application Dependencies

Additional Libraries

Qt Plugins

Deploying an Application on Qt/Mac

The Bundle

Xcode

Static Linking

Building Qt Statically

Linking the Application to the Static Version of Qt

Frameworks

Building Qt as Frameworks

Linking the Application to Qt as Frameworks

Creating the Application Package

Application Dependencies

Qt Plugins

Additional Libraries

Mac OS X Version Dependencies

Architecture Dependencies

Calculator Example

Calculator Class Definition

Calculator Class Implementation

Button Class Definition

Button Class Implementation

Extension Example

FindDialog Class Definition

FindDialog Class Implementation

Draggable Icons Example

DragWidget Class Definition

DragWidget Class Implementation

Fortune Client Example

Undo Framework

The Qt 4 Main Window Classes

Overview of the Main Window Classes

The Main Window Classes

Example Code

What's Changed since Qt 3?

New Functionality

Independent QDockWidget And QToolBar Classes

Code Change Examples

Recent Files Example

testcon - An ActiveX Test Container (ActiveQt)

Tetrix Example

TetrixWindow Class Definition

TetrixWindow Class Implementation

TetrixPiece Class Definition

TetrixPiece Class Implementation

TetrixBoard Class Definition

TetrixBoard Class Implementation

Previewer Example

QtScript Calculator Example

License Wizard Example

The LicenseWizard Class

The IntroPage Class

The EvaluatePage Class

The ConclusionPage Class

Window Flags Example

ControllerWindow Class Definition

ControllerWindow Class Implementation

PreviewWindow Class Definition

PreviewWindow Class Implementation

Qt's Classes

Qt's Namespaces

Remote Control Example

Format of the QDataStream Operators

Image Viewer Example

ImageViewer Class Definition

ImageViewer Class Implementation

Broadcast Receiver Example

Dir View Example

Using QtDBus Adaptors

D-Bus Adaptor Example

The header

The properties

The constructor

Slots/methods

Signals

Declaring Slots in D-Bus Adaptors

Asynchronous Slots

Input-Only Slots

Input and Output Slots

Automatic Replies

Delayed Replies

Declaring Signals in D-Bus Adaptors

The QtDBus Type System

Primitive Types

Compound Types

Extending the Type System

The Type System in Use

The VNC Protocol and Qt for Embedded Linux

Qt for Embedded Linux Environment Variables

Embedded Dialogs

QtOpenGL Module

Installation

How to Use X11 Overlays with Qt

QtTest Module

Global Qt Declarations

Types

Functions

Macros

Using qt.conf

The Qt 4 Database GUI Layer

General Overview

Example Code

Comparison with Qt 3

Image Composition Example

Setting Up The Resource File

ImageComposer Class Definition

ImageComposer Class Implementation

The Function

Phonon Overview

Introduction

Architecture

Media Objects

Sinks

Processors

Playback

Building Graphs

Audio

Audio Effects

Video

Backends

Querying Backends for Support

Installing Phonon

Windows

Linux

Mac OS X

Work in Progress

Phonon Module

License Information

Address Book Example

Overview

TableModel Class Definition

TableModel Class Implementation

AddressWidget Class Definition

AddressWidget Class Implementation

NewAddressTab Class Definition

NewAddressTab Class Implementation

AddDialog Class Definition

AddDialog Class Implementation

MainWindow Class Definition

MainWindow Class Implementation

main() Function

Drag and Drop Puzzle Example

Window Geometry

X11 Peculiarities

Restoring a Window's Geometry

Deploying Qt for Embedded Linux Applications

Fonts

Environment Variables

Framebuffer Support

QtSql Module

Connecting to Databases

Executing SQL Statements

Executing a Query

Navigating the Result Set

Inserting, Updating, and Deleting Records

Transactions

Using the SQL Model Classes

The SQL Query Model

The SQL Table Model

The SQL Relational Table Model

Presenting Data in a Table View

Creating Data-Aware Forms

Annotated Class Index

Gradients

C++ Source Code Analyzer Example

Overview

Global variables

Thanks!

Configuring Qt

The Coordinate System

Rendering

Logical Representation

Aliased Painting

Anti-aliased Painting

Transformations

Window-Viewport Conversion

Setting the Application Icon

Setting the Application Icon on Windows

Setting the Application Icon on Mac OS X

Setting the Application Icon on Common Linux Desktops

K Desktop Environment (KDE)

GNOME

Rich Text Processing

Rich Text Document Structure

Rich Text Documents

Document Elements

Text Blocks

Frames

Tables

Lists

Images

The QTextCursor Interface

Cursor-Based Editing

Using a Cursor

Grouping Cursor Operations

Multiple Cursors

Inserting Document Elements

Text and Text Fragments

Blocks

Frames

Tables

Lists

Images

Common Rich Text Editing Tasks

Using QTextEdit

Selecting Text

Finding Text

Printing Documents

Advanced Rich Text Processing

Handling Large Files

Supported HTML Subset

Block Attributes

List Attributes

Table Cell Attributes

CSS Properties

Supported CSS Selectors

CDE Style Widget Gallery

Qt Tutorial

Qt Tutorial 1 - Hello World!

Line by Line Walkthrough

Running the Application

Exercises

Qt Tutorial 2 - Calling it Quits

Line by Line Walkthrough

Running the Application

Exercises

Qt Tutorial 3 - Family Values

Line by Line Walkthrough

On being mindful of the order of things

Running the Application

Exercises

Qt Tutorial 4 - Let There Be Widgets

Line by Line Walkthrough

Running the Application

Exercises

Qt Tutorial 5 - Building Blocks

Line by Line Walkthrough

Running the Application

Exercises

Qt Tutorial 6 - Building Blocks Galore!

Line by Line Walkthrough

Running the Application

Exercises

Qt Tutorial 7 - One Thing Leads to Another

Line by Line Walkthrough

t7/lcdrange.h

t7/lcdrange.cpp

t7/main.cpp

Compiling the Application

Running the Application

Exercises

Qt Tutorial 8 - Preparing for Battle

Line by Line Walkthrough

t8/lcdrange.h

t8/lcdrange.cpp

t8/cannonfield.h

t8/cannonfield.cpp

t8/main.cpp

Running the Application

Exercises

Qt Tutorial 9 - With Cannon You Can

Line by Line Walkthrough

t9/cannonfield.cpp

Running the Application

Exercises

Qt Tutorial 10 - Smooth as Silk

Line by Line Walkthrough

t10/cannonfield.h

t10/cannonfield.cpp

t10/main.cpp

Running the Application

Exercises

Qt Tutorial 11 - Giving It a Shot

Line by Line Walkthrough

t11/cannonfield.h

t11/cannonfield.cpp

t11/main.cpp

Running the Application

Exercises

Qt Tutorial 12 - Hanging in the Air the Way Bricks Don't

Line by Line Walkthrough

t12/lcdrange.h

t12/lcdrange.cpp

t12/cannonfield.h

t12/cannonfield.cpp

t12/main.cpp

Running the Application

Exercises

Qt Tutorial 13 - Game Over

Line by Line Walkthrough

t13/lcdrange.cpp

t13/cannonfield.h

t13/cannonfield.cpp

t13/gameboard.h

t13/gameboard.cpp

t13/main.cpp

Running the Application

Exercises

Qt Tutorial 14 - Facing the Wall

Line by Line Walkthrough

t14/cannonfield.h

t14/cannonfield.cpp

t14/gameboard.cpp

Running the Application

Exercises

Master Detail Example

Group Box Example

Window Class Definition

Window Class Implementation

qt3to4 - The Qt 3 to 4 Porting Tool

Usage

Porting Rules

Location of the qt3porting.xml File

Logging

Advanced Usage

Limitations

Legal Notices

Contributions to the Following qt3to4 Files: treewalker.h, treedump.cpp, treedump.h, treewalker.cpp

Basic Drawing Example

Window Class Definition

Window Class Implementation

RenderArea Class Definition

RenderArea Class Implementation

QtScript Tetrix Example

Qt Commercial Editions

Qt Console Edition Classes

Qt Desktop Edition Classes

Qt Desktop Light Edition Classes

QtXml Module

Configuring the Build Process

The QtXml Stream Classes

The Qt SAX2 Classes

Introduction to SAX2

SAX2 Features

Namespace Support via Features

Summary

Properties

The Qt DOM Classes

Introduction to DOM

An Introduction to Namespaces

Conventions Used in the Qt XML Documentation

Qt's Modules

Qt Open Source Edition

Dot Net Example (ActiveQt)

Qt vs. .NET

Walkthrough: .NET interop with MC++ and IJW

Walkthrough: .NET/COM Interop with ActiveQt

Starting a Project

Importing Qt Widgets

Using Qt Widgets

Handling Qt Signals

Summary

Limitations

Performance Considerations

Qt for Embedded Linux Fonts

FreeType Formats

Qt Prerendered Font (QPF2)

Legacy Qt Prerendered Font (QPF)

The Legacy File

Platform Notes

Platform Notes - X11

AIX - 5.1 or later

FreeBSD - 6.0-RELEASE

HP-UX

PA-RISC - B.11.11 or later

Itanium - B.11.23 or later

OpenGL Support

IRIX - 6.5.x

Linux

Installation problems

Solaris - 9 or later

CC on Solaris

GCC on Solaris

Solaris 2.6

Platform Notes - Windows

Windows Vista

Windows XP, Windows 2000 and Windows NT

Installation location

AccelGALAXY graphic card

Possible GL conflict

Windows 98 and Me

Unicode support

COMCTL32 problems

Platform Notes - Mac OS X

General Information

Required GCC version

Binary Package

Mac OS X on Intel hardware

Build Issues

Fink

MySQL and Mac OS X

Qt and Precompiled Headers (PCH)

Supported Platforms

32-Bit Platforms

64-Bit Platforms

Supported Features

What's New in Qt 4

New Technologies in Qt 4

Recent Additions to Qt 4

Significant Improvements

Build System

Include Syntax

Namespaces

QObject/QWidget Constructors

Dynamic Casts

QPointer<T>

Paint Events

Qt 3 Support Layer

What's New in Qt 4.4

Qt WebKit Integration

Multimedia API

Concurrent Programming

Improved Help System

Windows CE

Widgets in Graphics View

Qt for Embedded Linux

File System Example

Overview

Implementing Styles and Style Aware Widgets

Introduction

The QStyle implementation

The Style Elements

Primitive Elements

Control Elements

Complex Control Elements

Other QStyle Tasks

Style Options

QStyle Functions

The Palette

Implementation Issues

Java Style

Design and Implementation

Limitations and Differences from Java

Styling Java Check Boxes

Widget Walkthrough

Common Widget Properties

Widget Reference

Push Buttons

Check and Radio Buttons

Tabs

Scroll Bars

Sliders

Spin Boxes

Title Bar

Combo Box

Group Boxes

Splitters

Progress Bar

Tool Buttons

Toolbars

Menus

Menu Bar

Item View Headers

Tree Branch Indicators

Tool Boxes

Size Grip

Rubber Band

Dock Widgets

A Short Path to XQuery

Introduction

Atomic Values

Using Atomic Values

More Node Constructors

Further Reading

FAQ

Path expressions misses

Variable in for loop is out of scope

Expressions aren't evaluated

Filters selects the wrong things.

for/let/order by doesn't behave as expected

Custom Sort/Filter Model Example

MySortFilterProxyModel Class Definition

MySortFilterProxyModel Class Implementation

Window Class Definition

Window Class Implementation

The Main() Function

Qt's Property System

Requirements for Declaring Properties

Reading and Writing Properties with the Meta-Object System

A Simple Example

Dynamic Properties

Adding Additional Information to a Class

Main Window

Known Issues in 4.4.0-rc1

The Virtual Framebuffer

Displaying the Virtual Framebuffer

Skins

The File Menu

The View Menu

Running Applications Using the Virtual Framebuffer

Thread Support in Qt

The Threading Classes

Creating a Thread

Synchronizing Threads

QtConcurrent

Reentrancy and Thread-Safety

Threads and QObjects

QObject Reentrancy

Per-Thread Event Loop

Accessing QObject Subclasses from Other Threads

Signals and Slots Across Threads

Threads and Implicit Sharing

Threads and the SQL Module

Painting in Threads

Threads and Rich Text Processing

Threads and the SVG module

Recommended Reading