HomeHome

ClassesAnnotated - TreeFunctionsHomeStructure

Qt Class Reference


The Qt class is a namespace for miscellaneous identifiers that need to be global-like. More...

#include <qnamespace.h>

Inherited by QBrush, QCanvasItem, QCustomMenuItem, QEvent, QIconViewItem, QListViewItem, QMutex, QObject, QPainter, QPen, QPixmap, QSemaphore, QStyleSheetItem, QTableItem, QThread, QToolTip, QWaitCondition and QWhatsThis.

List of all member functions.

Public Members


Detailed Description

The Qt class is a namespace for miscellaneous identifiers that need to be global-like.

Normally, you can ignore this class. QObject and a few other classes inherit it, so that all the identifiers in the Qt namespace are visible to you without qualification.

However, occasionally you may need to say Qt::black instead just black, particularly in static utility functions (such as many class factories).

Examples: menu/menu.cpp


Member Type Documentation

Qt::AlignmentFlags

This enum type is used to describe alignment. It contains four sets of flags: Horizontal, vertical and modifying flags. The horizontal flags are: The vertical flags are: You can only use one of the horizontal flags at a time. There is one two-dimensional flag: This counts both as a horizontal and vertical flag: It cannot be combined with any other horizontal or vertical flags.

There are also some modifier flags. All of them apply only to printing:

You can only use one of the horizontal flags at a time, and one of the vertical flags. AlignCenter counts as both horizontal and vertical. You can use as many modifier flags as you want, except that SingleLine and WordBreak cannot be combined.

Flags that are inappropriate for a given use (e.g. ShowPrefix to QGridLayout::addWidget()) are ignored.

Conflicting combinations of flags have undefined meanings.

Qt::ButtonState

This enum type describes the state of the mouse buttons and the modifier buttons. The currently defined values are:

Qt::Orientation

This type is used to signify whether an object should be Horizontal or Vertical (for example in QScrollBar).

Qt::PenCapStyle

This enum type defines the pen cap styles supported by Qt; ie. what sorts of line end caps that can be drawn using QPainter. The available styles are:

Qt::PenJoinStyle

This enum type defines the pen join styles supported by Qt; ie. what sorts of joins between two connected lines that can be drawn using QPainter. The available styles are:

Qt::PenStyle

This enum type defines the pen styles supported by Qt; ie. what sorts of lines that can be drawn using QPainter. The current styles are:

Qt::RasterOp

This enum type is used to describe the way things are written to the paint device. Each bit of the src (what you write) interacts with the corresponding bit of the dst pixel. The currently defined values are:

By far the most useful ones are CopyROP and XorROP.

Qt::TextFormat

This enum is used in widgets that can display both plain text and rich text, e.g. QLabel. It is used for deciding whether a text string should be interpreted as the one or the other. This is normally done by passing one of the enum values to a setTextFormat() function.

Qt::WidgetFlags

This enum type is used to specify various window-system properties of the widget. Mostly they are fairly unusual, but necessary in a few cases.

The main types are

There are also a number of flags to let you customize the appearance of top-level windows. These have no effect on other windows. Finally, there are some modifier flags:

Search the documentation, FAQ, qt-interest archive and more (uses www.trolltech.com):


This file is part of the Qt toolkit, copyright © 1995-2000 Trolltech, all rights reserved.


Copyright © 2000 TrolltechTrademarks
Qt version 2.2.1