The Qt class is a namespace for miscellaneous identifiers that need to be global-like. More...
Inherited by QBrush, QCanvasItem, QCustomMenuItem, QEvent, QGfx, QIconViewItem, QListViewItem, QMutex, QObject, QPainter, QPen, QPixmap, QSemaphore, QStyleSheetItem, QTableItem, QThread, QToolTip, QWaitCondition and QWhatsThis.
List of all member functions.
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
AlignLeft- Align with the left edge.
AlignRight- Align with the right edge.
AlignHCenter- Center horizontally in the available space.
AlignTop- Align with the top.
AlignBottom- Align with the bottom.
AlignVCenter- Center vertically in the available space.
AlignCenter- Center in both dimensions.
There are also some modifier flags. All of them apply only to printing:
SingleLine- Treat all white-space as space and print just one line.
DontClip- If it's impossible to stay within the given bounds, print outside.
ExpandTabs- Make the U+0009 (ascii tab) character move to the next tab stop.
ShowPrefix- Display the string "&P" as an underlined P (see QButton for an example). To get an ampersand, use "&&".
WordBreak- Do line breaking at at appropriate points.
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
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.
NoButton- used when the button state does not refer to any button (see QMouseEvent::button()).
LeftButton- set if the left button is pressed, or this event refers to the left button. Note that the left button may be the right button on left-handed mice.
RightButton- the right button.
MidButton- the middle button
ShiftButton- a shift key on the keyboard is also pressed.
ControlButton- a control key on the keyboard is also pressed.
AltButton- an alt (or meta) key on the keyboard is also pressed.
Keypad- a keypad button is pressed.
Vertical(for example in QScrollBar).
FlatCap- A square line end that does not cover the end point of the line.
SquareCap- A square line end that covers the end point and extends beyond it with half the line width.
RoundCap- A rounded line end.
MiterJoin- The outer edges of the lines are extended to meet at an angle, and this area is filled.
BevelJoin- The triangular notch between the two lines is filled.
RoundJoin- A circular arc between the two lines is filled.
NoPen- no line at all. For example, QPainter::drawRect() fills but does not draw any explicit boundary line.
SolidLine- a simple line.
DashLine- dashes, separated by a few pixels.
DotLine- dots, separated by a few pixels.
DashDotLine- alternately dots and dashes.
DashDotDotLine- one dash, two dots, one dash, two dots...
CopyROP- dst = src
OrROP- dst = src OR dst
XorROP- dst = src XOR dst
NotAndROP- dst = (NOT src) AND dst
EraseROP- an alias for
NotCopyROP- dst = NOT src
NotOrROP- dst = (NOT src) OR dst
NotXorROP- dst = (NOT src) XOR dst
AndROP- dst = src AND dst
NotEraseROP- an alias for
NotROP- dst = NOT dst
ClearROP- dst = 0
SetROP- dst = 1
NopROP- dst = dst
AndNotROP- dst = src AND (NOT dst)
OrNotROP- dst = src OR (NOT dst)
NandROP- dst = NOT (src AND dst)
NorROP- dst = NOT (src OR dst)
By far the most useful ones are
On Qt/Embedded, only
CopyROP, XorROP, and
NotROP are supported.
PlainText- The text string is interpreted as a normal text string.
RichText- The text string is interpreted as a rich text according to the current QStyleSheet::defaultSheet().
AutoText- The text string is interpreted as for
RichTextif QStyleSheet::mightBeRichText() returns TRUE, otherwise as for
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
WType_TopLevel- indicates that this widget is a top-level widget, usually with a window-system frame and so on.
WType_Modal- indicates that this widget is a modal top-level widget, ie. that it prevents widgets in all other top-level widget from getting any input.
WType_Popup- indicates that this widget is a popup top-level window, ie. that it is modal, but has a window system frame appropriate for popup menus.
WType_Desktop- indicates that this widget is the desktop. See also
WStyle_Customize- indicates that instead of the default, the WStyle_* flags should be used to build the window.
WStyle_NormalBorder- gives the window a normal border. Cannot be combined with
WStyle_DialogBorder- gives the window a thin dialog border. Cannot be combined with
WStyle_NoBorder- gives a borderless window. Note that the user cannot move or resize a borderless window via the window system. Cannot be combined with
WStyle_DialogBorder.On Windows, the flag works fine. On X11, it bypasses the window manager completely. This results in a borderless window, but also in a window that is not managed at all (i.e. for example no keyboard focus unless you call setActiveWindow() manually. ) For compatibility, the flag was not changed for Qt-2.1. We suggest using WStyle_NoBorderEx instead.
WStyle_NoBorderEx- gives a borderless window. Note that the user cannot move or resize a borderless window via the window system. Cannot be combined with
WStyle_DialogBorder.On X11, the result of the flag is depending on the window manager and its ability to understand MOTIF hints to some degree. Most existing modern window managers do this. With
WX11BypassWM,you can bypass the window manager completely. This results in a borderless window for sure, but also in a window that is not managed at all (i.e. for example no keyboard input unless you call setActiveWindow() manually )
WStyle_Title- gives the window a title bar.
WStyle_SysMenu- adds a window system menu.
WStyle_Minimize- adds a minimize button. Note that on Windows this has to be combined with WStyle_SysMenu for it to work.
WStyle_Maximize- adds a maximize button. Note that on Windows this has to be combined with WStyle_SysMenu for it to work.
WStyle_MinMax- is equal to
WStyle_Minimize|WStyle_Maximize.Note that on Windows this has to be combined with WStyle_SysMenu for it to work.
WStyle_ContextHelp- adds a context help button to dialogs.
WStyle_Tool- makes the window a tool window. A tool window is a small window that lives for a short time and it is typically used for creating popup windows. It there is a parent, the tool window will always be kept on top of it. If there isn't a parent, you may consider passing WStyle_StaysOnTop as well. If the window system supports it, a tool window is be decorated with a somewhat lighter frame. It can, however, be combined with
WStyle_StaysOnTop- informs the window system that the window should stay on top of all other windows.
WStyle_Dialog- indicates that the window is a logical subwindow of its parent, in other words: a dialog. The window will not get its own taskbar entry and be kept on top of its parent by the window system. Usually, it will also be minimized when the parent is minimized. If not customized, the window is decorated with a slightly simpler title bar. This is the flag QDialog uses.
WDestructiveClose- makes Qt delete this object when the object has accepted closeEvent(), or when the widget tried to ignore closeEvent() but could not.
WPaintDesktop- gives this widget paint events for the desktop.
WPaintUnclipped- makes all painters operating on this widget unclipped. Children of this widget, or other widgets in front of it, do not clip the area the painter can paint on.
WPaintClever- indicates that Qt should not try to optimize repainting for the widget, but instead pass on window system repaint events directly. (This tends to produce more events and smaller repaint regions.)
WResizeNoErase- indicates that resizing the widget should not erase it. This allows smart-repainting to avoid flicker.
WMouseNoMask- indicates that even if the widget has a mask, it wants mouse events for its entire rectangle.
WNorthWestGravity- indicates that the widget contents is north-west aligned and static. On resize, such a widget will receive paint events only for the newly visible part of itself.
WRepaintNoErase- indicates that the widget paints all its pixels. Updating, scrolling and focus changes should therefore not erase the widget. This allows smart-repainting to avoid flicker.
WGroupLeader- makes this widget or window a group leader. Modality of secondary windows only affects windows within the same group.
Search the documentation, FAQ, qt-interest archive and more (uses
This file is part of the Qt toolkit, copyright © 1995-2005 Trolltech, all rights reserved.
|Copyright © 2005 Trolltech||Trademarks|
Qt version 2.3.10