Qt Reference Documentation

Notes for X11 Users

Qt Backends

Notes for Windows Users

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

Argument Formats

Subclassing QSpinBox

Subclassing

Implicit vs Explicit Sharing

Standard Editing Widgets

Creating Your Own Codec Class

Subclassing QGraphicsLayoutItem

Nesting QGraphicsLayoutItems

Introduction

Characters and Abbreviations for Sets of Characters

Sets of Characters

Quantifiers

Capturing Text

Assertions

Wildcard Matching

Notes for Perl Users

Code Examples

Subwindow Handling

Reading and Writing Image Files

Image Information

Pixel Manipulation

Image Formats

Image Transformations

Legal Information

No copy constructor or assignment operator

Auto-Connection

Dynamic Properties

Using QWebPage in a Widget-less Environment

Subclassing

Subclassing

Subclassing

XQuery Sequences

Adding strings

Iterating over the strings

Manipulating the strings

Standard Shortcuts

Keyboard Layout Issues

GNU Emacs Style Key Sequences

Improving Performance

Overlays

Painting Techniques

URL Handlers

Notes on Locale

Number-String Conversions

8-bit Character Comparisons

Subclassing

Running XQueries

Running XPath Expressions

Running XSLT stylesheets

Binding A Query To A Starting Node

Reentrancy and Thread-Safety

Error Handling

Resource Management

Event Handling

Size Hints and Layouts

Qt Main Window Framework

Creating Main Window Components

Creating Menus

Creating Toolbars

Creating Dock Widgets

The Status Bar

Storing State

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

Usage

Subclassing

Thread Safety

A Note on GUI Types

Using canConvert() and convert() Consecutively

A Trivial Example

Wizard Look and Feel

Elements of a Wizard Page

Registering and Using Fields

Creating Linear Wizards

Creating Non-Linear Wizards

Writing a Custom Layout

Activating the Layout

Activating the Layout Implicitly

Event Handling

Margin Handling

Use of Gregorian and Julian Calendars

Use of Gregorian and Julian Calendars

No Year 0

Range of Valid Dates

Use of Gregorian and Julian Calendars

Use of Gregorian and Julian Calendars

No Year 0

Range of Valid Dates

Use of System Timezone

Daylight Savings Time (DST)

A Note for X11 Users

Composing a QPainterPath

QPainterPath Information

QPainterPath Conversion

Examples

Standard Roles and Data Types

Subclassing

QStyledItemDelegate vs. QItemDelegate

Basic Usage

Iterating Through Completions

The Completion Model

Handling Tree Models

Versioning

Reading and writing raw binary data

Reading and writing other Qt classes.

Sorting

Filtering

Subclassing

Notes for X11 Users

Notes for Mac OS X Users

Notes for Windows and Mac OS X Users

Creating and Using Regions

Additional License Information

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

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

Pen Style

Cap Style

Join Style

Event Handling and Propagation

Performance Issues

Platform-Specific MIME Types

Comparing QXmlNames

Undo and Redo Actions

Command Compression and Macros

Clean State

Groups of Functions

Flags and the Meta-Object System

Naming Convention

Creating and using preview widgets

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

Settings

Drawing

Rendering Quality

Coordinate Transformations

Clipping

Composition Modes

Limitations

Modal Dialogs

Modeless Dialogs

Default Button

Escape Key

Extensibility

Return Value (Modal Dialogs)

Code Examples

Reading and Writing Image Files

Pixmap Information

Pixmap Conversion

Pixmap Transformations

SOCKS5

Namespaces

Incremental parsing

Performance and memory consumption

Platform-Specific Behavior

Introduction and Concepts

Using QTextEdit as a Display Widget

Read-only Key Bindings

Using QTextEdit as an Editor

Drag and Drop

Editing Key Bindings

Thread-Safety

Other Pointer Classes

Moving Header Sections

Appearance

Document Source and Contents

Navigation

Property Meta-Data

Copying and Assignment

Drag and Drop

Appearance

Looking up Translations

Using Multiple Translations

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

The Property-based API

Rich Text and the Text Format Property

Severity Levels and the Icon and Pixmap Properties

The Static Functions API

Advanced Usage

Default and Escape Keys

Making Classes that Use QIcon

Subclassing

Notes for Windows users

Reading Files Directly

Using Streams to Read Files

Signals

Platform Specific Issues

Usage

Platform Dependent Look and Feel

QMenuBar on Mac OS X

QMenuBar on Windows CE

Examples

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

Relationships and Navigation

Properties

Actions and Selection

Objects and children

Elements of QWebView

Navigation

Visual Appearance

Coordinate Systems

Styles

Dynamic Resource Loading

Navigation and Directory Operations

Files and Directory Contents

The Current Directory and Other Special Paths

Path Manipulation and Strings

Examples

Embedding a Widget with QGraphicsProxyWidget

Synchronizing Widget States

Basic Use

Writing Custom Types to a Stream

Web Application Support

Key Bindings

Improving Performance

Caveats

Actions

QMenu on Qt for Windows CE

Size Hints and Size Policies in QGraphicsLinearLayout

Spacing within QGraphicsLinearLayout

Stretch Factor in QGraphicsLinearLayout

QGraphicsLinearLayout Compared to Other Layouts

Subclassing

Approaches to Binding Values

Rendering Graphics

Basic Matrix Operations

Integer vs. Floating Point Precision

Alpha-Blended Drawing

Predefined Colors

The HSV Color Model

The CMYK Color Model

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

Creating Translucent Windows

Native Widgets vs Alien Widgets

Rendering

Coordinates

Rendering

Coordinates

Setting a Style

Developing Style-Aware Custom Widgets

Creating a Custom Style

Using a Custom Style

Right-to-Left Desktops

Styles in Item Views

Subclassing QStyledItemDelegate

QStyledItemDelegate vs. QItemDelegate

Using a Pop-up Calendar Widget

Headers

Rows and Columns

Cells

Large tables

Selections

Signals

Rendering Graphics

Basic Matrix Operations

Communicating via Channels

Synchronous Process API

Notes for Windows Users

Syntax Highlighter Example

Highlighter Class Definition

Highlighter Class Implementation

MainWindow Class Definition

MainWindow Class Implementation

Windows CE - Introduction to using Qt

Required tools

Installing Qt

Building your own applications

Running the application

Semaphores Example

Global Variables

Producer Class

Consumer Class

The main() Function

Qt Widget Gallery

Fortune Client Example

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

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

QtCore Module

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

Resource Compiler (rcc)

Recent Files Example

QtHelp Module

Topics

Overview

Generating Qt Help

Creating a Qt Help Collection

Using Qt Help

Using Qt Assistant

Using QHelpEngine API

License Information

Qt Help Project

Qt Help Project File Format

Namespace

Virtual Folders

Custom Filters

Filter Section

Filter Attributes

Table of contents

Keywords

Files

Fine-Tuning Features in Qt

Simple Customization

Embedded Linux

Windows CE

Managing Large Numbers of Features

Qt website

Bug Report Form

Third-Party Tools

Qt Solutions

Books about Qt Programming

GUI Programming with Qt 3

Qt Homepage

About Qt

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

Qt Extended

Qt Quarterly

Task Tracker

Qt Mailing Lists

Whitepapers

QtCanvas

ModelTest

D-Bus Accessibility Bridge

qtestlib-tools Announcement

qtestlib-tools

Qt Script for Applications (QSA)

QtSharedMemory

Porting to Qt 4.2's Graphics View

QtWinForms Solution

Installation FAQ

Debugging Techniques

Configuring Qt for Debugging

Debugging in Mac OS X and Xcode

Debugging With/Without Frameworks

With Frameworks:

Without Frameworks:

Debug Symbols and Size

Command Line Options Recognized by Qt

Warning and Debugging Messages

Providing Support for the qDebug() Stream Operator

Debugging Macros

Common Bugs

The Virtual Framebuffer

Displaying the Virtual Framebuffer

Skins

The File Menu

The View Menu

Running Applications Using the Virtual Framebuffer

Main Window

Windows CE - Working with Custom SDKs

Creating a Custom Build Specification

Fine-Tuning Options

Cross-compilation Environment for a Custom SDK

Compiling Qt for a Custom SDK

Making Qt Applications Start on a Custom Device

Windows CE - Using shadow builds

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 2109

RFC 2965

RFC 3174

RFC 3491

RFC 3986

Dependency Walker

ECMA-262

JavaScript: The Definitive Guide

WebKit Open Source Project

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

OpenSSL Toolkit

Arora Browser

ActivePerl

HTML 4

HTML 5

XML Bookmark Exchange Language Resource Page

error handling in the XQuery language

XaoS

http://www.unixodbc.org

http://www.postgresql.org

Compiling PostgreSQL On Native Win32 FAQ

http://www.freetds.org

http://www.sybase.com

http://linux.sybase.com

http://www.sqlite.org

Threads Primer: A Guide to Multithreaded Programming

Thread Time: The Multithreaded Programming Guide

Pthreads Programming: A POSIX Standard for Better Multiprocessing

Win32 Multithreaded Programming

IANA character-sets encoding file

"Item View Classes" Chapter of C++ GUI Programming with Qt 4

Mac OS X Aqua

KDE applications

Netscape Cookie Specification

Mitigating Cross-site Scripting With HTTP-only Cookies

Framebuffer HOWTO

Trafikanten

GNU General Public License

GNU Lesser General Public License, version 2.1

Sun Studio Patches

Styles Example

NorwegianWoodStyle Class Definition

NorwegianWoodStyle Class Implementation

WidgetGallery Class

Drill Down Example

InformationWindow Class Definition

InformationWindow Class Implementation

View Class Definition

View Class Implementation

ImageItem Class Definition

ImageItem Class Implementation

D-Bus Viewer

Framebuffer Object Example

Delayed Encoding Example

SourceWidget Class Definition

SourceWidget Class Implementation

MimeData Class Definition

MimeData Class Implementation

Style Sheet Example

GNU General Public License (GPL)

The GNU General Public License (Version 3)

GNU Lesser General Public License (LGPL)

The GNU Lesser General Public License (Version 2.1)

Nokia Qt LGPL Exception version 1.0

QtDesigner Module

Creating Custom Widget Plugins

Retrieving Access to Qt Designer Components

Creating User Interfaces at Run-Time

SQL Widget Mapper Example

Window Class Definition

Window Class Implementation

Summary and Further Reading

Moving from Qt 3 to Qt 4

Qt 3 Features to Avoid

Painting Outside Paint Events

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

Dynamic Layouts Example

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.5

Qt WebKit Integration

Performance Improvements

Mac OS X Cocoa Support

Windows CE Feature Parity

XML Transformations with XSLT

Qt Script Debugger

OpenDocument File Format Support

Improved Network Proxy Support

Qt Designer Improvements

Qt Linguist Improvements

Graphics Enhancements

The dumpcpp Tool (ActiveQt)

Threaded Fortune Server Example

Qt3Support Module

A Short Path to XQuery

Introduction

Using Path Expressions To Match & Select Items

Axis Steps

Axis Specifiers

Node Tests

Shorthand Form

Name Tests

Wildcards in Name Tests

Using Predicates In Path Expressions

Positional Predicates

Boolean Predicates

Constructing Elements

Element Constructors are Expressions

Constructing Atomic Values

Running The Cookbook Examples

cookbook.xml

Further Reading

FAQ

Why didn't my path expression match anything?

What if my input namespace is different from my output namespace?

Why doesn't my return clause work?

Why didn't my expression get evaluated?

My predicate is correct, so why doesn't it select the right stuff?

Why doesn't my FLWOR behave as expected?

Why are my elements created in the wrong order?

Why can't I use and in my XQuery?

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

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

Standard Dialogs Example

File System Example

Introduction

The User Inteface

Running your own XQueries

Code Walk-Through

The Custom Node Model Class: FileTree

Accessing The Node Model

Building And Traversing The Node Model

The UI Class: MainWindow

Selecting A Directory To Model

Selecting And Running An XQuery

Node Model Building Strategy

Calculator Form Example

Preparation

CalculatorForm Class Definition

CalculatorForm Class Implementation

Qt for Embedded Linux Fonts

FreeType Formats

Qt Prerendered Font (QPF2)

Legacy Qt Prerendered Font (QPF)

The Legacy File

Format of the QDataStream Operators

Ported Asteroids Example

Hello GL ES Example

Using QGLWidget

Using OpenGL ES rendering commands

Porting OpenGL to OpenGL ES

Using QGLPainter

Summary

Embedded Dialogs

Spin Box Delegate Example

SpinBoxDelegate Class Definition

SpinBoxDelegate Class Implementation

The Main Function

Drag and Drop Puzzle Example

Path Stroking

Qt for Embedded Linux

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

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

Mac OS X

Relevant Qt Classes

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

Network Chat Example

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

The Qt Linguist Window

Context Window

Strings Window

The Translation Area

Phrases and Guesses Window

Sources and Forms Window

Warnings Window

Translating Multiple Languages Simultaneously

Common Tasks

Leaving a Translation for Later

Phrases That Require Multiple Translations Depending on Context

Changing Keyboard Accelerators

Alt Key Accellerators

Ctrl Key Accelerators

Handling Numbered Arguments

Reusing Translations

Changing the Target Locale

Phrase Books

Creating and Editing Phrase Books

Shortcuts for Editing Phrase Books

Batch Translation

Validation Tests

Form Preview

Qt Linguist Reference

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

How to Report a Bug

The Coordinate System

Rendering

Logical Representation

Aliased Painting

Anti-aliased Painting

Transformations

Window-Viewport Conversion

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

IDC - The Interface Description Compiler (ActiveQt)

Pixel Buffers Example

Menubar Merging

Menus Example (ActiveQt)

Windows XP Style Widget Gallery

Fetch More Example

FileListModel Class Definition

FileListModel Class Implementation

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

License Wizard Example

The LicenseWizard Class

The IntroPage Class

The EvaluatePage Class

The ConclusionPage Class

Qutlook Example (ActiveQt)

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

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

Global Qt Declarations

Types

Functions

Macros

Simple Text Viewer Example

Creating Documentation and Customizing Qt Assistant

Organizing Documentation for Qt Assistant

Customizing Qt Assistant

Controlling Qt Assistant via the Assistant Class

MainWindow Class

FindFileDialog Class

Summary

Interview

Wait Conditions Example

Global Variables

Producer Class

Consumer Class

The main() Function

Dock Widgets Example

MainWindow Class Definition

MainWindow Class Implementation

Transformations Example

Transformation Operations

RenderArea Class Definition

RenderArea Class Implementation

Window Class Definition

Window Class Implementation

Summary

Thread Support in Qt 4

General Overview

Comparison with Qt 3

Text Finder Example

Setting Up The Resource File

TextFinder Class Definition

TextFinder Class Implementation

Function

Movie 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

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

System Tray Icon Example

Window Class Definition

Window Class Implementation

Books about GUI Design

Buying these Books from Amazon.com

Inter-Process Communication in Qt

D-Bus

TCP/IP

Shared Memory

Qt COmmunications Protocol (QCOP)

Windows Vista Style Widget Gallery

Style Plugin Example

SimpleStylePlugin Class Definition

SimpleStylePlugin Class Implementation

The function

The Simple Style Plugin Profile

Related articles and examples

Draggable Icons Example

DragWidget Class Definition

DragWidget Class Implementation

Window System Specific Notes

Qt for X11

Qt for Windows

Qt for Mac OS X

Qt for Embedded Linux

A standard ActiveX and the "simple" ActiveQt widget

Simple Example (ActiveQt)

Text Object Example

SvgTextObject Class Definition

SvgTextObject Class Implementation

Window Class Definition

Window Class Implementation

Combo Widget Mapper Example

Window Class Definition

Window Class Implementation

Summary and Further Reading

Meta-Object System

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

RSS-Listing Example

COM App Example (ActiveQt)

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

Simple Decoration Example

Styles and Window Decorations

MyDecoration Class Definition

MyDecoration Class Implementation

Finding Regions

Painting the Decoration

Using the Decoration

Notes

The Qt 4 Style API

General Overview

Example Code

Comparison with Qt 3

Composition Modes

Unicode

Information about Unicode on the Web

The Standard

Unicode in Qt

Framebuffer Object 2 Example

Custom Sort/Filter Model Example

MySortFilterProxyModel Class Definition

MySortFilterProxyModel Class Implementation

Window Class Definition

Window Class Implementation

The Main() Function

The dumpdoc Tool (ActiveQt)

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

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

SDI Example

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

Local Fortune Client Example

Completer Example

The Resource File

DirModel Class Definition

DirModel Class Implementation

MainWindow Class Definition

MainWindow Class Implementation

Function

Border Layout Example

Qt's Tools

Qt Demonstrations

Painting

Item Views

SQL

Rich Text

Main Window

Graphics View

Tools

QtWebKit

Phonon

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

World Time Clock Builder Example

Preparation

Loading and Building the Form

Secure Socket Client Example

Form Extractor Example

Open Source Versions of Qt

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

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

Qt 3 Compatibility Classes

Annotated Class Index

Cleanlooks Style Widget Gallery

GTK Style Widget Gallery

Mouse Calibration Example

The Main Program

Calibration Class Definition

Calibration Class Implementation

QtScriptTools Module

Configuring the Build Process

Phonon Overview

Introduction

Architecture

Media Objects

Sinks

Processors

Playback

Building Graphs

Audio

Audio Effects

Video

Backends

Querying Backends for Support

Installing Phonon

Windows

Windows XP and later Windows versions

Earlier Windows versions than Windows XP

Setting up the environment

Linux

Mac OS X

Deploying Phonon Applications on Windows and Mac OS X

Work in Progress

Phonon Module

Qt Backends

License Information

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

Qt Performance Tuning

Programming Style

Static vs. Dynamic Linking

Alternative Memory Allocation

Bypassing the Backing Store

QTestLib Manual

QTestLib Features

QTestLib API

Using QTestLib

Creating a Test

Building a Test

QTestLib Command Line Arguments

Syntax

Options

Creating a Benchmark

Using QTestLib remotely on Windows CE

Using

Syntax

Options

QtRemote

Requirements

3rd Party Code

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

Chapter 5: Writing a Benchmark

Writing a Benchmark

Data Functions

External Tools

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

Qt's Property System

Requirements for Declaring Properties

Reading and Writing Properties with the Meta-Object System

A Simple Example

Dynamic Properties

Properties and Custom Types

Adding Additional Information to a Class

Draggable Text Example

Concentric Circles Example

CircleWidget Class Definition

CircleWidget Class Implementation

Window Class Definition

Window Class Implementation

Music Player Example

MainWindow Class Definition

MainWindow Class Implementation

The main() function.

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

Object Trees and Object Ownership

Overview

Construction/Destruction Order of QObjects

XML Stream Lint Example

Basic Operation

Standard Accelerator Keys

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

Dir View Example

QtSvg Module

SVG Support

Configuring the Build Process

Rendering SVG files

Additional Information

Qt for Embedded Linux Display Management

Available Drivers

Specifying a Driver

Subdrivers and Multiple Drivers

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

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

Trivial Wizard Example

Introduction Page

Registration Page

Conclusion Page

Function

QtDBus XML compiler (qdbusxml2cpp)

Creating Shared Libraries

Using Symbols from Shared Libraries

Header File Considerations

Binary compatibility

Flow Layout Example

Media Player

SAX Bookmarks Example

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

Qt Script Tetrix Example

Overview

Setting up the GUI

C++ Source Code Analyzer Example

Introduction

Reporting Uses of Mutable Global Variables

A C++ application

The XML description of the C++ application

The XQuery for finding global variables

Running the XQuery

The XQuery output

XQuery Code Walk-Through

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

Basic Drawing Example

Window Class Definition

Window Class Implementation

RenderArea Class Definition

RenderArea Class Implementation

QtXmlPatterns Module

Introduction

Advantages of using QtXmlPatterns and XQuery

Using the QtXmlPatterns module

Running the query engine from your Qt application

Running the query engine from the command line utility

The XQuery Data Model

Binding program variables to XQuery variables

Binding To QVariant::Time

Binding To QVariantList

Interpreting XQuery results

Handling QXmlNames

No mapping for xs:time

Using XQuery with Non-XML Data

More on using QtXmlPatterns with non-XML Data

Security Considerations

Code Injection

Denial of Service Attacks

Features and Conformance

XQuery 1.0

XSLT 2.0

XPath 2.0

xml:id

Resource Loading

XML

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

Text Edit

Arrow Pad Example

Line by Line Walkthrough

Translating to French and Dutch

Exercises

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

License Information

QXmlStream Bookmarks Example

XbelWriter Class Definition

XbelWriter Class Implementation

XbelReader Class Definition

XbelReader Class Implementation

MainWindow Class Definition

MainWindow Class Implementation

Function

Code Editor Example

The LineNumberArea Class

CodeEditor Class Definition

CodeEditor Class Implementation

Suggestions for Extending the Code Editor

Qt for Embedded Linux Character Input

Available Keyboard Drivers

Specifying a Keyboard Driver

QtGui Module

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

An Overview of Qt's Examples

Widgets

Dialogs

Main Windows

Layouts

Painting

Item Views

Graphics View

Rich Text

Tools

Desktop

Drag and Drop

Threads

Concurrent Programming

Network

XML

XQuery, XPath

OpenGL

SQL

Help System

Qt Designer

UiTools

Qt Linguist

Qt Script

Phonon Multimedia Framework

WebKit

Qt for Embedded Linux

ActiveQt

Another Source of Examples

Tool Tips Example

SortingBox Class Definition

SortingBox Class Implementation

ShapeItem Class Definition

ShapeItem Class Implementation

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

SVG Generator Example

The DisplayWidget Class

The Window Class

Further Reading

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

Window Geometry

X11 Peculiarities

Restoring a Window's Geometry

Cached Table Example

TableEditor Class Definition

TableEditor Class Implementation

Scribble Example

ScribbleArea Class Definition

ScribbleArea Class Implementation

MainWindow Class Definition

MainWindow Class Implementation

Affine Transformations

ActiveQt Framework

Custom Completer Example

Setting Up The Resource File

TextEdit Class Definition

TextEdit Class Implementation

MainWindow Class Definition

MainWindow Class Implementation

Function

Codecs Example

MDI Example

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?

Cross-Platform Accessibility Support in Qt 4

General Overview

Enabling Accessibility Support

Creating New Accessible Interfaces

Example Code

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

Queued Custom Type Example

Overview

The Block Class

The Window Class

The RenderThread Class

Registering the Type

Further Reading

Tetrix Example

TetrixWindow Class Definition

TetrixWindow Class Implementation

TetrixPiece Class Definition

TetrixPiece Class Implementation

TetrixBoard Class Definition

TetrixBoard Class Implementation

Fortune Server Example

Extension Example

FindDialog Class Definition

FindDialog Class Implementation

TrafficInfo Example

Overview

Retrieving the Data

Porting Qt Applications to Qt for Embedded Linux

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

Grabber Example

Third-Party Licenses Used in Qt

FreeType 2 () version 2.3.6

HarfBuzz ()

MD5 ( and )

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

MNG Library () version 1.0.10

PNG Reference Library () version 1.2.29

TIFF Software Distribution () version 3.8.2

SQLite () version 3.5.9

Wintab API ()

Data Compression Library () version 1.2.3

The ptmalloc memory allocator () version 1.8

Broadcast Receiver Example

Introduction to D-Bus

Introduction

The Buses

Concepts

Messages

Service Names

Object Paths

Interfaces

Cheat Sheet

Further Reading

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

Arthur Plugin

Image Viewer Example

ImageViewer Class Definition

ImageViewer Class Implementation

Editable Tree Model Example

Overview

Design

TreeItem Class Definition

TreeItem Class Implementation

TreeModel Class Definition

TreeModel Class Implementation

I18N Example

Web Browser

Recipes Example

Introduction

The User Interface

Running your own XQueries

Code Walk-Through

The UI Class: QueryMainWindow

QtConcurrent Progress Dialog Example

Windows Style Widget Gallery

DOM Bookmarks Example

Line Edits Example

Window Class Definition

Window Class Implementation

Settings Editor Example

Font Sampler Example

Broadcast Sender Example

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

Color Editor Factory Example

Window Class Implementation

ColorListEditor Definition

ColorListEditor Implementation

Further Customization of Item View Editors

Complex Ping Pong Example

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

Widgets Tutorial

Address Book Tutorial

Tools for ActiveQt

Scripting with ECMAScript

Threading and Concurrent Programming

Qt for Windows CE

Window Flags Example

ControllerWindow Class Definition

ControllerWindow Class Implementation

PreviewWindow Class Definition

PreviewWindow Class Implementation

Desktop Integration

Opening External Resources

System Tray Icons

Desktop Widgets

Endian Conversion Functions

Generic Algorithms

Types of Iterators

Input Iterators

Output Iterators

Forward Iterators

Bidirectional Iterators

Random Access Iterators

Calculator Example

Calculator Class Definition

Calculator Class Implementation

Button Class Definition

Button Class Implementation

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

Pad Navigator Example

D-Bus Chat Example

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

Custom Script Class Example

ByteArray Class In Use

ByteArray Class Implementation

ByteArray Iterator Implementation

ByteArray Prototype Implementation

Pixelator Example

ImageModel Class Definition

ImageModel Class Implementation

PixelDelegate Class Definition

PixelDelegate Class Implementation

Using The Custom Delegate

Image Composition Example

Setting Up The Resource File

ImageComposer Class Definition

ImageComposer Class Implementation

The Function

Character Map Example

CharacterWidget Class Definition

CharacterWidget Class Implementation

MainWindow Class Definition

MainWindow Class Implementation

Deploying Qt for Embedded Linux Applications

Fonts

Environment Variables

Framebuffer Support

Basic Graphics Layouts Example

Window Class Definition

Window Class Implementation

LayoutItem Class Definition

LayoutItem Class Implementation

Overview of Qt's Undo Framework

Introduction

Classes

Concepts

Tablet Example

MainWindow Class Definition

MainWindow Class Implementation

TabletCanvas Class Definition

TabletCanvas Class Implementation

TabletApplication Class Definition

TabletApplication Class Implementation

The function

Qt Designer Manual

Legal Notices

What's New in Qt Designer 4.5

General Changes

Improved Shortcuts for the Editing Mode

Layouts

Support for Embedded Design

Related Classes

Getting to Know Qt Designer

Launching Designer

The User Interface

The Concept of Layouts in Qt

A Quick Start to Qt Designer

Qt Designer's Editing Modes

Qt Designer's Widget Editing Mode

Editing A Form

The Property Editor

Dynamic Properties

The Object Inspector

Using Layouts in Qt Designer

Applying and Breaking Layouts

Setting A Top Level Layout

Horizontal and Vertical Layouts

The Grid Layout

Splitter Layouts

The Form Layout

Shortcut Keys

Saving, Previewing and Printing Forms in Qt Designer

Viewing the Form's Code

Saving and Printing the Form

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

Using Containers in Qt Designer

Creating Main Windows in Qt Designer

Menus

Toolbars

Actions

Dock Widgets

Editing Resources with Qt Designer

Defining a Resource File

Using the Resources

Using Stylesheets with Qt Designer

Using a Designer .ui File 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

Customizing Qt Designer Forms

Modifying the Form Settings

Using Custom Widgets with Qt Designer

Handling Custom Widgets

Promoting Widgets

User Defined Custom Widgets

Creating Custom Widgets for Qt Designer

Getting Started

Providing an Interface Description

Notes on the Function

Plugin Requirements

Creating Well Behaved Widgets

Building and Installing the Plugin

A Simple Plugin

Splitting up 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

Screenshot Example

Screenshot Class Definition

Screenshot Class Implementation

Calculator Builder Example

Preparation

CalculatorForm Class Definition

CalculatorForm Class Implementation

Known Issues in 4.5.1

General Issues

Issues with Third Party Software

Intel Compiler Support

X11 Hardware Support

Windows Hardware Support

Windows Software Issues

Mac OS X Software Support

Macintosh Style Widget Gallery

Drop Site Example

DropArea Class Definition

DropArea Class Implementation

DropSiteWindow Class Definition

DropSiteWindow Class Implementation

The main() Function

Elastic Nodes Example

Group Box Example

Window Class Definition

Window Class Implementation

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

World Time Clock Plugin Example

WorldTimeClock Class

WorldTimeClockPlugin Class

The Project File: worldtimeclockplugin.pro

QtNetwork Module

Configuring the Build Process

High Level Network Operations

Writing HTTP and FTP Clients with QHttp and QFtp

Using TCP with QTcpSocket and QTcpServer

Using UDP with QUdpSocket

Resolving Host Names using QHostInfo

Support for Network Proxies

Qt Commercial Editions

Qt Full Framework Edition Classes

Qt GUI Framework Edition Classes

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

Selecting the Painting Backend

All Overviews and HOWTOs

SQL Browser

D-Bus List Names Example

Testing the Linux Framebuffer

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

Timers

Regular Expressions Example

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

DEPLOYMENT_PLUGIN

DESTDIR

DESTDIR_TARGET

DLLDESTDIR

DISTFILES

DSP_TEMPLATE

FORMS

FORMS3

GUID

HEADERS

INCLUDEPATH

INSTALLS

LEXIMPLS

LEXOBJECTS

LEXSOURCES

LIBS

LITERAL_HASH

MAKEFILE

MAKEFILE_GENERATOR

MOC_DIR

OBJECTS

OBJECTS_DIR

OBJMOC

POST_TARGETDEPS

PRE_TARGETDEPS

PRECOMPILED_HEADER

PWD

OUT_PWD

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_EXTRA_COMPILERS

QMAKE_EXTRA_TARGETS

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_INFO_PLIST

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

_PRO_FILE_

_PRO_FILE_PWD_

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

Syntax

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

Basic Sort/Filter Model Example

Painter Paths Example

Window Class Definition

Window Class Implementation

RenderArea Class Definition

RenderArea Class Implementation

QtScript Calculator Example

Default Prototypes Example

Other Licenses 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

The Qt Resource System

Resource Collection Files ()

External Binary Resources

Compiled-In Resources

Using Resources in the Application

QtWebKit Module

Configuring the Build Process

Architecture

Netscape Plugin Support

License Information

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

Installation

Installing Qt on X11 Platforms

Installing Qt on Windows

Installing Qt on Mac OS X

Installing Qt on Windows CE

General Qt Requirements

OpenSSL (version 0.9.7 or later)

Platform-Specific Requirements

Qt for Windows Requirements

Qt for Mac OS X Requirements

Qt for X11 Requirements

QtGui Dependencies

Phonon Dependencies

Qt for Windows CE Requirements

Qt for Embedded Linux Requirements

Building Qt for Embedded Linux with uclibc

Memory Requirements

Additional X11 Libraries for QVFb

D-Bus Remote Controlled Car Example

Ported Canvas Example

Platform Notes

Platform Notes - X11

AIX - 5.2

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

Unpackaging and Solaris tar

CC on Solaris

GCC on Solaris

Platform Notes - Windows

Windows Vista

Windows XP, Windows 2000 and Windows NT

Installation location

AccelGALAXY graphic card

Possible GL conflict

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

Most Common Actively Supported Platforms

Actively Supported Platforms

Community Supported Platforms

Unsupported Platforms

Supported Features

Platform Notes - Windows CE

Platform Notes - Embedded Linux

Compiler Notes

GCC

GCC on Windows (MinGW)

GCC 4.0.0

HP-UX

Solaris

Mac OS X

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

Relational Table Model Example

Developing Qt Applications on Mac OS X

What Versions of Mac OS X are Supported?

Carbon or Cocoa?

Which One Should I Use?

Universal Binaries

Day-to-Day Application Development on OS X

Deployment - "Compile once, deploy everywhere"

Qt Assistant Manual

The One-Minute Guide to Using Qt Assistant

Qt Assistant in More Detail

Command Line Options

Tool Windows

Documentation Window

Toolbars

Menus

File Menu

Edit Menu

View Menu

Go Menu

Bookmarks Menu

Dialogs

Print Dialog

Preferences Dialog

Find Text Control

Filtering Help Contents

Full Text Searching

Using Qt Assistant as a Custom Help Viewer

Qt Help Collection Files

Displaying Custom Documentation

Changing the Appearance of Qt Assistant

Creating a Custom Help Collection File

Using Qt Assistant Remotely

Compatibility with Old Formats

Implementing Atomic Operations

Macros for Defining Plugins

The Tulip Container Classes

General Overview

Examples

Comparison with Qt 3

Shaped Clock Example

ShapedClock Class Definition

ShapedClock Class Implementation

Notes on Widget Masks

Running Qt for Embedded Linux Applications

Using a Single Display

Using Multiple Displays

Command Line Options

The Network Module in Qt 4

General Overview

Example Code

TCP Client

TCP Server

UDP Senders and Receivers

Comparison with Qt 3

Previewer Example

The User Interface

Previewer Class Definition

Previewer Class Implementation

MainWindow Class Definition

MainWindow Class Implementation

The Function

QtUiTools Module

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

Other Resources

Sliders Example

Window Class Definition

Window Class Implementation

SlidersGroup Class Definition

SlidersGroup Class Implementation

Qt for Embedded Linux Architecture

Client/Server Communication

Pointer Handling Layer

Character Input Layer

Graphics Rendering

Drawing on Screen

Colliding Mice Example

Mouse Class Definition

Mouse Class Definition

The Main() Function

testcon - An ActiveX Test Container (ActiveQt)

Application Example

MainWindow Class Definition

MainWindow Class Implementation

The main() Function

The Resource File

Deploying Qt Applications

Static vs. Shared Libraries

Deploying Qt's Libraries

Licensing

Platform-Specific Notes

Deploying an Application on X11 Platforms

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 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 Onwards

Application Dependencies

Additional Libraries

Qt Plugins

Deploying an Application on Mac OS X

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

Deploying Phonon Applications on Mac OS X

Architecture Dependencies

The Mac Deployment Tool

The qtmain Library

License Information

Session Management

Shutting a Session Down

Protocols and Support on Different Platforms

Getting Session Management to Work with Qt

Testing and Debugging Session Management

Calendar Widget Example

Window Class Definition

Window Class Implementation

Windows CE OpenGL ES

Introduction

Using OpenGL to Accelerate Normal 2D Painting

Spin Boxes Example

Window Class Definition

Window Class Implementation

Plastique Style Widget Gallery

Qt is Mac OS X Native

The Global Menu Bar

Aqua

Dock

Accessiblity

Development Tools

Web Browser Example (ActiveQt)

QtAssistant Module

Multiple Inheritance Example

CalculatorForm Definition

CalculatorForm Implementation

Function

Pixel Buffers 2 Example

QtConcurrent Run Function Example

Simple Widget Mapper Example

Window Class Definition

Window Class Implementation

More Complex Mappings

Using qt.conf

Qt Examples

ActiveQt

Concurrent Programming

D-Bus

Desktop

Dialogs

Drag and Drop

Graphics View

Help System

Item Views

Layouts

Main Windows

Network

OpenGL

Painting

Phonon Multimedia Framework

Qt Designer

Qt Linguist

Qt for Embedded Linux

Qt Script

Rich Text

SQL

Threads

Tools

UiTools

WebKit

Widgets

XML

XQuery, XPath

Inter-Process Communication

Chart Example

Standard Qt widgets in an HTML page

Wrapper Example (ActiveQt)

Analog Clock Example

AnalogClock Class Definition

AnalogClock Class Implementation

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_press_and_hold_context(bool enable)

Configuring Qt

User Interface Compiler (uic)

Options

Examples

Qt Editions

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

Using HTML Markup in Text Widgets

Supported Tags

Block Attributes

List Attributes

Table Cell Attributes

CSS Properties

Supported CSS Selectors

Creating Custom Qt Types

Overview

Creating a Custom Type

Declaring the Type with QMetaType

Creating and Destroying Custom Objects

Making the Type Printable

Further Reading

QtConcurrent Word Count Example

Member Function Index

Custom Type Example

Overview

The Message Class Definition

The Message Class Implementation

Using the Message

Further Reading

makeqpf

OpenGL in an HTML page

OpenGL Example (ActiveQt)

Two Simple Qt Widgets

Multiple Example (ActiveQt)

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

Textures Example

Undo Framework

Local Fortune Server Example

Qt Script Debugger Manual

Getting Started

Overview of Debugger Components

Resuming Script Evaluation

Resuming After an Uncaught Exception

Console Command Reference

Breakpoint-related Commands

break <location>

clear <location>

condition <breakpoint-id> <expression>

delete <breakpoint-id>

disable <breakpoint-id>

enable <breakpoint-id>

ignore <breakpoint-id> <count>

info breakpoints

tbreak <location>

File-related Commands

list <location>

info scripts

Execution-related Commands

advance <location>

continue

eval <program>

finish

interrupt

next <count = 1>

return <expression>

step <count = 1>

Stack-related Commands

backtrace

down

frame <index>

info locals

up

Spreadsheet

QtConcurrent Image Scaling Example

Qt Widget Hierarchy

Hierarchy Example (ActiveQt)

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

Qt for Embedded Linux Pointer Handling

Available Drivers

Specifying a Driver

Troubleshooting

Device Files

File Permissions

The Qt 4 Database GUI Layer

General Overview

Example Code

Comparison with Qt 3

Item Views Puzzle Example

Qt for Embedded Linux Environment Variables

Class Wizard Example

ClassWizard Class Definition

The ClassWizard Class

The IntroPage Class

The ClassInfoPage Class

The CodeStylePage Class

Remote Control 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

Further Reading

Printing with Qt

Paint Devices and Printing

Creating a QPrinter

Painting onto a Page

Coordinate Systems

Printing from Complex Widgets

Notes about PDF Licensing

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

The VNC Protocol and Qt for Embedded Linux

Configuring Qt with VNC Capabilities

Running a Server Application

Running Client Applications

Related Resources

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

Calling Qt Functions From Unix Signal Handlers

Books Demonstration

Digital Clock Example

DigitalClock Class Definition

DigitalClock Class Implementation

Find Files Example

Window Class Definition

Window Class Implementation

SIP Dialog Example

Dialog Class Definition

Dialog Class Implementation

The function

Capabilities Example

Window Class Definition

Window Class Implementation

The main() function

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

Boxes

Qt Reference Documentation (Open Source Edition)

Custom Type Sending Example

Overview

The Window Class Definition

The Window Class Implementation

Making the Connection

Further Reading

QtTest Module

How to Learn Qt

QtConcurrent Map Example

Loopback Example

Qt's Main Classes

Order Form Example

DetailsDialog Definition

DetailsDialog Implementation

MainWindow Definition

MainWindow Implementation

Function

Overpainting Example

GLWidget Class Definition

GLWidget Class Implementation

Summary

QtOpenGL Module

Installation

How to Use X11 Overlays with Qt

Widgets Tutorial

Introduction

Creating a Window

Using Layouts

QObject XML Model Example

Introduction

The User Interface

Code Walk-Through

The Custom Node Model Class: QObjextXmlModel

Accessing The Node Model

Traversing The Node Model

Including The QMetaObject Tree

Menus Example

MainWindow Class Definition

MainWindow Class Implementation

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

The New Qt Designer

The Current State of Qt Designer

User Interface Features

Editing Features

Plugin Support

Run-Time Support for Forms

Thanks!

Porting .ui Files to Qt 4

uic Output

Working with uic3

Limitations of uic3

Icons

Custom Widgets

Custom Widget Plugin Example

Preparation

AnalogClock Class Definition and Implementation

AnalogClockPlugin Class Definition

AnalogClockPlugin Implementation

Master Detail Example

Fridge Magnets Example

DragLabel Class Definition

DragLabel Class Implementation

DragWidget Class Definition

DragWidget Class Implementation

Dragging

Dropping

Summary

FTP Example

FtpWindow Class Definition

FtpWindow Class Implementation

Context2D Example

Using The HTML Canvas Element in a Web Browser

Using Qt Script to script a Canvas

The Context2D Class

Implementation

The Canvas Widget

The Environment

The Application Window

SVG Viewer Example

40000 Chips

CDE Style Widget Gallery

Events and Event Filters

How Events are Delivered

Event Types

Event Handlers

Event Filters

Sending Events

Sample Buffers Example

Torrent Example

License Information

Hello Script Example

Translating the Application

D-Bus Ping Pong Example

Wiggly Example

Dialog Class Definition

Dialog Class Implementation

WigglyWidget Class Definition

WigglyWidget Class Implementation

Mac Main Window Demo

Concurrent Filter and Filter-Reduce

Concurrent Filter

Concurrent Filter-Reduce

Additional API Features

Using Iterators instead of Sequence

Using Member Functions

Using Function Objects

Using Bound Function Arguments

Qt Object Model

Qt Objects: Identity vs Value

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

Basic Layouts Example

Dialog Class Definition

Dialog Class Implementation

QtDBus module

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

Calendar Example

MainWindow Class Definition

MainWindow Class Implementation

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

License Information

Vector Deformation

Tree Model Completer Example

The Resource File

TreeModelCompleter Class Definition

TreeModelCompleter Class Implementation

MainWindow Class Definition

MainWindow Class Implementation

Function

Examples and Demos Launcher

Troll Print Example

Line by Line Walkthrough

Running Troll Print 1.0 in English and in Portuguese

Troll Print 1.1

Motif Style Widget Gallery

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

Implicitly Shared Classes

Overview

Implicit Sharing in Detail

List of Classes

Secure Sockets Layer (SSL) Classes

Text Processing Classes

Threading Classes

Date and Time Classes

Non-GUI Classes

XML Classes

Scripting Classes

Script Tools

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

Qt Ownership

Script Ownership

Auto-Ownership

What Happens When Someone Else Deletes the QObject?

Customizing Access to the QObject

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

Enum Values

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

Function Objects and Native Functions

Calling a Qt Script Function from C++

The Object

Wrapping a Native Function

The QScriptContext Object

Processing Function Arguments

Formal Parameters and the Arguments Object

Checking the Number of Arguments

Checking the Types of Arguments

Functions with Variable Numbers of Arguments

Accessing the Arguments Object

Constructor Functions

Associating Data with a Function

Native Functions as Arguments to Functions

The Activation Object

Nested Functions and the Scope Chain

Property Getters and Setters

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

Managing Non-QObject-based Objects

Defining Custom Script Classes with QScriptClass

Error Handling and Debugging Facilities

Redefining print()

Using QtScript Extensions

Internationalization

Use qsTr() for All Literal Text

Use String.prototype.arg() for Dynamic Text

Produce Translations

Apply Translations

ECMAScript Compatibility

QtScript Extensions to ECMAScript

Qt's Classes

Qt's Namespaces

Layout Classes

Introduction

Horizontal, Vertical, Grid, and Form Layouts

Laying Out Widgets in Code

Tips for Using Layouts

Adding Widgets to a Layout

Stretch Factors

Custom Widgets in Layouts

Layout Issues

Manual Layout

How to Write A Custom Layout Manager

The Header File ()

The Implementation File ()

Further Notes

Qt for Embedded Platforms

Creating QtScript Extensions

Static Extensions

Trademarks

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

Query Model Example

Shared Memory Example

Class Inheritance Hierarchy

Table Model Example

Qt for Mac OS X - Specific Issues

GUI Applications

Painting

Library Support

Qt libraries as frameworks

Bundle-Based Libraries

Combining Libraries

Initialization Order

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

Contributions to the Following QtGui Files: qapplication_cocoa_p.h, qapplication_mac.mm, qdesktopwidget_mac.mm qeventdispatcher_mac.mm qeventdispatcher_mac_p.h qmacincludes_mac.h qt_cocoa_helpers.mm qt_cocoa_helpers_p.h qwidget_mac.mm qsystemtrayicon_mac.mm

Gradients

Tutoriel "Carnet d'adresses"

Carnet d'adresses 1 - Conception de l'interface utilisateur

Programmation en Qt - héritage

La classe AddressBook

Implémentation de la classe AddressBook

Exécution de l'application

Carnet d'adresses 2 - Ajouter des adresses

Définition de la classe AddressBook

Implémentation de la classe AddressBook

Carnet d'adresses 3 - Navigation entre les éléments

Définition de la classe AddressBook

Implémentation de la classe AddressBook

Carnet d'Adresses 4 - éditer et supprimer des adresses

Définition de la classe AddressBook

Implémentation de la classe AddressBook

Mise à jour de l'Interface utilisateur

Carnet d'adresse 5 - Ajout d'une fonction de recherche

Définition de la classe FindDialog

Implémentation de la classe FindDialog

Définition de la classe AddressBook

Implémentation de la classe AddressBook

Carnet d'Adresses 6 - Sauvegarde et chargement

Définition de la classe AddressBook

Implémentation de la classe AddressBook

Carnet d'adresse 7 - Fonctionnalités avancées

Définition de la classe AddressBook

Implémentation de la classe AddressBook

Drag and Drop Robot Example

Config Dialog Example

HTTP Example

Qt's Modules

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

Mandelbrot Example

RenderThread Class Definition

RenderThread Class Implementation

MandelbrotWidget Class Defintion

MandelbrotWidget Class Implementation

The main() Function

Blocking Fortune Client Example