2D and 3D Graphics

Table of contents:

D and 3D Graphics

  • Painting with QPainter
  • Graphics with QCanvas
  • Printing
  • Graphics with OpenGL

In this chapter, we will explore Qt's graphics capabilities. The cornerstone of Qt's 2D drawing engine is QPainter, which can be used to draw on a widget on the screen, on an off-screen pixmap, or on a physical printer. Qt also includes a QCanvas class that provides a higher-level way of doing graphics, using an item-based approach that can efficiently handle thousands and thousands of items of various shapes. Many predefined items are provided, and it is easy to create custom canvas items.

An alternative to QPainter and QCanvas is to use the OpenGL library. OpenGL is a standard library for drawing 3D graphics, but it can also be used for drawing 2D graphics. It is very easy to integrate OpenGL code into Qt applications, as we will demonstrate.

Part I: Basic Qt

Getting Started

Creating Dialogs

Creating Main Windows

Implementing Application Functionality

Creating Custom Widgets

Part II: Intermediate Qt

Layout Management

Event Processing

2D and 3D Graphics

Drag and Drop

Input/Output

Container Classes

Databases

Networking

XML

Internationalization

Providing Online Help

Multithreading

Platform-Specific Features



C++ GUI Programming with Qt 3
C++ GUI Programming with Qt 3
ISBN: 0131240722
EAN: 2147483647
Year: 2006
Pages: 140

Flylib.com © 2008-2020.
If you may any questions please contact us: flylib@qtcs.net