Qyoto
4.0.7
Qyoto is a C# language binding for Qt
|
The Qt namespace contains miscellaneous identifiers used throughout the Qt library. More...
Public Member Functions | |
delegate QTextStream | FuncQTextStreamQTextStream (QTextStream qTextStream) |
delegate void | ActionQtMsgTypeString (QtMsgType qtMsgType, string @string) |
delegate QObject | FuncQObject () |
delegate string | FuncStringQByteArray (QByteArray qByteArray) |
delegate QByteArray | FuncQByteArrayString (string @string) |
Static Public Member Functions | |
static QDataStream | Write (QDataStream s, object p) |
static QDataStream | Write (QDataStream stream, QSizeF size) |
More... | |
static QDataStream | Write (QDataStream stream, QPoint point) |
More... | |
static QTextStream | Write (QTextStream s, Qt.FuncQTextStreamQTextStream f) |
static QDataStream | Write (QDataStream stream, QLineF line) |
More... | |
static QDataStream | Write (QDataStream stream, QPointF point) |
More... | |
static QDataStream | Write (QDataStream @out, QChar chr) |
More... | |
static QDataStream | Write (QDataStream @out, QByteArray ba) |
More... | |
static QDataStream | Write (QDataStream stream, QEasingCurve easing) |
More... | |
static QDataStream | Write (QDataStream stream, QRectF rectangle) |
More... | |
static QDataStream | Write (QDataStream @out, QDateTime dateTime) |
More... | |
static QDataStream | Write (QDataStream @out, QUrl url) |
More... | |
static QDataStream | Write (QDataStream @out, QTime time) |
More... | |
static QDataStream | Write (QDataStream arg1, QLocale arg2) |
static QDataStream | Write (QDataStream @out, QBitArray ba) |
More... | |
static QDataStream | Write (QDataStream s, QUuid id) |
More... | |
static QDataStream | Write (QDataStream stream, QLine line) |
More... | |
static QDataStream | Write (QDataStream @out, QDate date) |
More... | |
static QDataStream | Write (QDataStream @out, QRegExp regExp) |
More... | |
static QDataStream | Write (QDataStream stream, QRect rectangle) |
More... | |
static QDataStream | Write (QDataStream stream, QSize size) |
More... | |
static QDataStream | Write (QDataStream s, QVariant.Type p) |
static QDataStream | Write (QDataStream arg1, string arg2) |
static QDataStream | Write (QDataStream @out, System.Collections.Generic.List< string > list) |
More... | |
static QDataStream | Read (QDataStream @in, QChar chr) |
More... | |
static QDataStream | Read (QDataStream arg1, QLocale arg2) |
static QDataStream | Read (QDataStream stream, QRect rectangle) |
More... | |
static QDataStream | Read (QDataStream arg1, QEasingCurve arg2) |
static QDataStream | Read (QDataStream @in, QDate date) |
More... | |
static QDataStream | Read (QDataStream @in, QUrl url) |
More... | |
static QDataStream | Read (QDataStream s, QUuid id) |
More... | |
static QTextStream | Read (QTextStream s, Qt.FuncQTextStreamQTextStream f) |
static QDataStream | Read (QDataStream stream, QLineF line) |
More... | |
static QDataStream | Read (QDataStream stream, QRectF rectangle) |
More... | |
static QDataStream | Read (QDataStream stream, QPointF point) |
More... | |
static QDataStream | Read (QDataStream stream, QLine line) |
More... | |
static QDataStream | Read (QDataStream @in, QBitArray ba) |
More... | |
static QDataStream | Read (QDataStream stream, QSize size) |
More... | |
static QDataStream | Read (QDataStream @in, QDateTime dateTime) |
More... | |
static QDataStream | Read (QDataStream @in, QTime time) |
More... | |
static QDataStream | Read (QDataStream stream, QPoint point) |
More... | |
static QDataStream | Read (QDataStream @in, QRegExp regExp) |
More... | |
static QDataStream | Read (QDataStream s, object p) |
static QDataStream | Read (QDataStream @in, QByteArray ba) |
More... | |
static QDataStream | Read (QDataStream stream, QSizeF size) |
More... | |
static QDataStream | Read (QDataStream arg1, string arg2) |
static QDataStream | Read (QDataStream s, QVariant.Type p) |
static QDataStream | Read (QDataStream @in, System.Collections.Generic.List< string > list) |
More... | |
static double | QAcos (double v) |
More... | |
static void | QAddPostRoutine (System.Action ptr) |
More... | |
static double | QAsin (double v) |
More... | |
static double | QAtan (double v) |
More... | |
static double | QAtan2 (double x, double y) |
More... | |
static void | QBadAlloc () |
static int | QCeil (double v) |
More... | |
static ushort | QChecksum (string s, uint len) |
More... | |
static QByteArray | QCompress (QByteArray data, int compressionLevel=-1) |
More... | |
static QByteArray | QCompress (Pointer< byte > data, int nbytes, int compressionLevel=-1) |
More... | |
static double | QCos (double v) |
More... | |
static double | QExp (double v) |
More... | |
static double | QFabs (double v) |
static double | QFastCos (double x) |
static double | QFastSin (double x) |
static string | QFlagLocation (string method) |
static int | QFloor (double v) |
More... | |
static bool | QFuzzyCompare (double p1, double p2) |
More... | |
static bool | QFuzzyCompare (float p1, float p2) |
More... | |
static bool | QFuzzyIsNull (double d) |
static bool | QFuzzyIsNull (float f) |
static uint | QHash (QBitArray key) |
More... | |
static uint | QHash (QChar key) |
More... | |
static uint | QHash (QStringRef key) |
static uint | QHash (QUrl url) |
More... | |
static uint | QHash (QPersistentModelIndex index) |
static uint | QHash (QByteArray key) |
More... | |
static uint | QHash (QModelIndex index) |
static uint | QHash (uint key) |
More... | |
static uint | QHash (char key) |
More... | |
static uint | QHash (byte key) |
More... | |
static uint | QHash (short key) |
More... | |
static uint | QHash (NativeLong key) |
More... | |
static uint | QHash (ushort key) |
More... | |
static uint | QHash (long key) |
More... | |
static uint | QHash (ulong key) |
More... | |
static uint | QHash (int key) |
More... | |
static uint | QHash (string key) |
More... | |
static uint | QHash (NativeULong key) |
More... | |
static Qt.ActionQtMsgTypeString | QInstallMsgHandler (Qt.ActionQtMsgTypeString handler) |
More... | |
static int | QIntCast (float f) |
static int | QIntCast (double f) |
static bool | QIsFinite (double d) |
static bool | QIsFinite (float f) |
static bool | QIsInf (float f) |
static bool | QIsInf (double d) |
static bool | QIsNaN (float f) |
static bool | QIsNaN (double d) |
static bool | QIsNull (float f) |
static bool | QIsNull (double d) |
static double | QLn (double v) |
More... | |
static double | QPow (double x, double y) |
More... | |
static void | QRegisterStaticPluginInstanceFunction (Qt.FuncQObject function) |
More... | |
static void | QRemovePostRoutine (System.Action arg1) |
static int | QRound (double d) |
More... | |
static long | QRound64 (double d) |
More... | |
static double | QSin (double v) |
More... | |
static double | QSqrt (double v) |
More... | |
static bool | QStringComparisonHelper (QStringRef s1, string s2) |
static double | QTan (double v) |
More... | |
static QByteArray | QUncompress (QByteArray data) |
More... | |
static QByteArray | QUncompress (Pointer< byte > data, int nbytes) |
More... | |
static void | Qbswap_helper (Pointer< byte > src, Pointer< byte > dest, int size) |
static QByteArray | Qgetenv (string varName) |
More... | |
static bool | Qputenv (string varName, QByteArray value) |
More... | |
static void | Qsrand (uint seed) |
More... | |
static int | Qstrcmp (QByteArray str1, QByteArray str2) |
static int | Qstrcmp (QByteArray str1, string str2) |
static int | Qstrcmp (string str1, QByteArray str2) |
static int | Qstrcmp (string str1, string str2) |
More... | |
static Pointer< sbyte > | Qstrcpy (Pointer< sbyte > dst, string src) |
More... | |
static Pointer< sbyte > | Qstrdup (string src) |
More... | |
static int | Qstricmp (string str1, string str2) |
More... | |
static uint | Qstrlen (string str) |
More... | |
static int | Qstrncmp (string str1, string str2, uint len) |
More... | |
static Pointer< sbyte > | Qstrncpy (Pointer< sbyte > dst, string src, uint len) |
More... | |
static int | Qstrnicmp (string str1, string str2, uint len) |
More... | |
static uint | Qstrnlen (string str, uint maxlen) |
More... | |
Static Public Attributes | |
</para > *< para > Creating QM files suitable for use with this[SmokeMethod("qtTrId(const char*, int)")] static strin | QtTrId )(string id, int n=-1) |
Properties | |
static string | QAppName [get] |
static double | QInf [get] |
static double | QQNaN [get] |
static double | QSNaN [get] |
static bool | QSharedBuild [get] |
static string | QVersion [get] |
More... | |
static int | Qrand [get] |
More... | |
The Qt namespace contains miscellaneous identifiers used throughout the Qt library.
The Qt namespace contains miscellaneous identifiers used throughout the Qt library.
This enum type is used to describe alignment. It contains horizontal and vertical flags that can be combined to produce the required effect.
The TextElideMode enum can also be used in many situations to fine-tune the appearance of aligned text.
The horizontal flags are:
The vertical flags are:
You can use only one of the horizontal flags at a time. There is one two-dimensional flag:
You can use at most one horizontal and one vertical flag at a time. Qt::AlignCenter counts as both horizontal and vertical.
Three enum values are useful in applications that can be run in right-to-left mode:
Masks:
Conflicting combinations of flags have undefined meanings.
Enumerator | |
---|---|
AlignAbsolute |
If the widget's layout direction is Qt::RightToLeft (instead of Qt::LeftToRight, the default), Qt::AlignLeft refers to the right edge and Qt::AlignRight to the left edge. This is normally the desired behavior. If you want Qt::AlignLeft to always mean "left" and Qt::AlignRight to always mean "right", combine the flag with Qt::AlignAbsolute. |
AlignBottom |
Aligns with the bottom. |
AlignCenter |
Centers in both dimensions. |
AlignHCenter |
Centers horizontally in the available space. |
AlignHorizontal_Mask | |
AlignJustify |
Justifies the text in the available space. |
AlignLeading |
Synonym for Qt::AlignLeft. |
AlignLeft |
Aligns with the left edge. |
AlignRight |
Aligns with the right edge. |
AlignTop |
Aligns with the top. |
AlignTrailing |
Synonym for Qt::AlignRight. |
AlignVCenter |
Centers vertically in the available space. |
AlignVertical_Mask |
An anchor has one or more of the following attributes:
Specifies a side of a layout item that can be anchored. This is used by QGraphicsAnchorLayout.
See also QGraphicsAnchorLayout.
This enum describes attributes that change the behavior of application-wide features. These are enabled and disabled using QCoreApplication::setAttribute(), and can be tested for with QCoreApplication::testAttribute().
Enumerator | |
---|---|
AA_AttributeCount | |
AA_CaptureMultimediaKeys |
Enables application to receive multimedia key events (play, next, previous etc). This includes also external sources such as headsets. Application can not use Remote Control framework on Symbian if this attribute is set. On Symbian, multimedia key event routing may vary between different devices. For example, application on background may receive multimedia key events only if it has active audio stream i.e. it is playing music or video. This attribute must be set before QApplication is constructed. This attribute is only supported in Symbian platform. |
AA_DontCreateNativeWidgetSiblings |
Ensures that siblings of native widgets stay non-native unless specifically set by the Qt::WA_NativeWindow attribute. |
AA_DontShowIconsInMenus |
Actions with the Icon property won't be shown in any menus unless specifically set by the QAction::iconVisibleInMenu property. Menus that are currently open or menus already created in the native Mac OS X menubar may not pick up a change in this attribute. Changes in the QAction::iconVisibleInMenu property will always be picked up. |
AA_DontUseNativeMenuBar |
All menubars created while this attribute is set to true won't be used as a native menubar (e.g, the menubar at the top of the main screen on Mac OS X or at the bottom in Windows CE). |
AA_ImmediateWidgetCreation |
Ensures that widgets are created as soon as they are constructed. By default, resources for widgets are allocated on demand to improve efficiency and minimize resource usage. Setting or clearing this attribute affects widgets constructed after the change. Setting it tells Qt to create toplevel windows immediately. Therefore, if it is important to minimize resource consumption, do not set this attribute. |
AA_MSWindowsUseDirect3DByDefault |
This value is obsolete and has no effect. |
AA_MacDontSwapCtrlAndMeta |
On Mac OS X by default, Qt swaps the Control and Meta (Command) keys (i.e., whenever Control is pressed, Qt sends Meta, and whenever Meta is pressed Control is sent). When this attribute is true, Qt will not do the flip. QKeySequence::StandardShortcuts will also flip accordingly (i.e., QKeySequence::Copy will be Command+C on the keyboard regardless of the value set, though what is output for QKeySequence::toString(QKeySequence::PortableText) will be different). |
AA_MacPluginApplication |
Stops the Qt mac application from doing specific initializations that do not necessarily make sense when using Qt to author a plugin. This includes avoiding loading our nib for the main menu and not taking possession of the native menu bar. When setting this attribute to true will also set the AA_DontUseNativeMenuBar attribute to true. |
AA_NativeWindows |
Ensures that widgets have native windows. |
AA_S60DisablePartialScreenInputMode |
By default in Symbian^3, a separate editing window is opened on top of an application. This is exactly like editing on previous versions of Symbian behave. When this attribute is false, a non-fullscreen virtual keyboard window is shown on top of application and it is ensured that the focused text input widget is visible. The auto-translation of input widget is only supported for applications based on QGraphicsView, but the non-fullscreen virtual keyboard will work for any kind of application (i.e. QWidgets-based). By default this attribute is true. This attribute must be set after QApplication is constructed. This is only supported in Symbian^3 and later Symbian releases. |
AA_S60DontConstructApplicationPanes |
Stops Qt from initializing the S60 status pane and softkey pane on Symbian. This is useful to save memory and reduce startup time for applications that will run in fullscreen mode during their whole lifetime. This attribute must be set before QApplication is constructed. |
AA_X11InitThreads |
Calls XInitThreads() as part of the QApplication construction in order to make Xlib calls thread-safe. This attribute must be set before QApplication is constructed. |
enum QtCore.Qt.ArrowType |
This enum type defines what happens to the aspect ratio when scaling an rectangle.
See also QSize::scale() and QImage::scaled().
enum QtCore.Qt.Axis |
enum QtCore.Qt.BGMode |
enum QtCore.Qt.BrushStyle |
This enum type defines the brush styles supported by Qt, i.e. the fill pattern of shapes drawn using QPainter.
See also QBrush.
enum QtCore.Qt.CheckState |
This enum describes the state of checkable items, controls, and widgets.
See also QCheckBox, Qt::ItemFlags, and Qt::ItemDataRole.
This enum describes the types of connection that can be used between signals and slots. In particular, it determines whether a particular signal is delivered to a slot immediately or queued for delivery at a later time.
With queued connections, the parameters must be of types that are known to Qt's meta-object system, because Qt needs to copy the arguments to store them in an event behind the scenes. If you try to use a queued connection and get the error message:
QObject::connect: Cannot queue arguments of type 'MyType'
Call qRegisterMetaType() to register the data type before you establish the connection.
When using signals and slots with multiple threads, see Signals and Slots Across Threads.
See also Thread Support in Qt, QObject::connect(), qRegisterMetaType(), and Q_DECLARE_METATYPE().
Enumerator | |
---|---|
AutoCompatConnection |
The default type when Qt 3 support is enabled. Same as AutoConnection but will also cause warnings to be output in certain situations. See Compatibility Signals and Slots for further information. |
AutoConnection |
(default) If the signal is emitted from a different thread than the receiving object, the signal is queued, behaving as Qt::QueuedConnection. Otherwise, the slot is invoked directly, behaving as Qt::DirectConnection. The type of connection is determined when the signal is emitted. |
BlockingQueuedConnection |
Same as QueuedConnection, except the current thread blocks until the slot returns. This connection type should only be used where the emitter and receiver are in different threads. Note: Violating this rule can cause your application to deadlock. |
DirectConnection |
The slot is invoked immediately, when the signal is emitted. |
QueuedConnection |
The slot is invoked when control returns to the event loop of the receiver's thread. The slot is executed in the receiver's thread. |
UniqueConnection |
Same as AutoConnection, but the connection is made only if it does not duplicate an existing connection. i.e., if the same signal is already connected to the same slot for the same pair of objects, then the connection will fail. This connection type was introduced in Qt 4.6. |
This enum type defines the various policies a widget can have with respect to showing a context menu.
This enum specifies the coordinate system.
This enum was introduced or modified in Qt 4.6.
Enumerator | |
---|---|
DeviceCoordinates |
Coordinates are relative to the upper-left corner of the object's paint device. |
LogicalCoordinates |
Coordinates are relative to the upper-left corner of the object. |
enum QtCore.Qt.Corner |
This enum describes the movement style available to text cursors. The options are:
This enum was introduced or modified in Qt 4.8.
This enum type defines the various cursors that can be used.
The standard arrow cursor is the default for widgets in a normal state.
enum QtCore.Qt.DateFormat |
Note: For ISODate formats, each Y, M and D represents a single digit of the year, month and day used to specify the date. Each H, M and S represents a single digit of the hour, minute and second used to specify the time. The presence of a literal T character is used to separate the date and time when both are specified.
Enumerator | |
---|---|
DefaultLocaleLongDate |
The long format used by the application's locale. |
DefaultLocaleShortDate |
The short format specified by the application's locale. |
ISODate |
ISO 8601 extended format: either YYYY-MM-DD for dates or YYYY-MM-DDTHH:mm:ss, YYYY-MM-DDTHH:mm:ssTZD (e.g., 1997-07-16T19:20:30+01:00) for combined dates and times. |
LocalDate |
This enum value is deprecated. Use Qt::SystemLocaleShortDate instead (or Qt::SystemLocaleLongDate if you want long dates). |
LocaleDate |
This enum value is deprecated. Use Qt::DefaultLocaleShortDate instead (or Qt::DefaultLocaleLongDate if you want long dates). |
SystemLocaleDate |
This enum value is deprecated. Use Qt::SystemLocaleShortDate instead (or Qt::SystemLocaleLongDate if you want long dates). |
SystemLocaleLongDate |
The long format used by the operating system. |
SystemLocaleShortDate |
The short format used by the operating system. |
TextDate |
The default Qt format, which includes the day and month name, the day number in the month, and the year in full. The day and month names will be short, localized names. This is basically equivalent to using the date format string, "ddd MMM d yyyy". See QDate::toString() for more information. |
enum QtCore.Qt.DayOfWeek |
enum QtCore.Qt.DropAction |
This enum can be used to specify event priorities.
Note that these values are provided purely for convenience, since event priorities can be any value between INT_MAX and INT_MIN, inclusive. For example, you can define custom priorities as being relative to each other:
enum CustomEventPriority
{
// An important event
ImportantEventPriority = Qt::HighEventPriority,
// A more important event
MoreImportantEventPriority = ImportantEventPriority + 1,
// A critical event
CriticalEventPriority = 100 * MoreImportantEventPriority,
// Not that important
StatusEventPriority = Qt::LowEventPriority,
// These are less important than Status events
IdleProcessingDoneEventPriority = StatusEventPriority - 1
};
See also QCoreApplication::postEvent().
enum QtCore.Qt.FillRule |
Specifies which method should be used to fill the paths and polygons.
This enum type defines the various policies a widget can have with respect to acquiring keyboard focus.
Enumerator | |
---|---|
ClickFocus |
The widget accepts focus by clicking. |
NoFocus |
The widget does not accept focus. |
StrongFocus |
The widget accepts focus by both tabbing and clicking. On Mac OS X this will also be indicate that the widget accepts tab focus when in 'Text/List focus mode'. |
TabFocus |
The widget accepts focus by tabbing. |
WheelFocus |
Like Qt::StrongFocus plus the widget accepts focus by using the mouse wheel. |
This enum specifies why the focus changed. It will be passed through QWidget::setFocus and can be retrieved in the QFocusEvent sent to the widget upon focus change.
See also Keyboard Focus.
This enum type describes additional flags that can be used when subscribing to a gesture.
This enum was introduced or modified in Qt 4.6.
See also QWidget::grabGesture() and QGraphicsObject::grabGesture().
Enumerator | |
---|---|
DontStartGestureOnChildren |
By default gestures can start on the widget or over any of its children. Use this flag to disable this and allow a gesture to start on the widget only. |
IgnoredGesturesPropagateToParent |
Since Qt 4.7, this flag allows you to fine-tune gesture event propagation. By setting the flag when grabbing a gesture all ignored partial gestures will propagate to their parent items. |
ReceivePartialGestures |
Allows any ignored gesture events to be propagated to parent widgets which have specified this hint. By default only gestures that are in the Qt::GestureStarted state are propagated and the widget always gets the full gesture sequence starting with a gesture in the Qt::GestureStarted state and ending with a gesture in the Qt::GestureFinished or Qt::GestureCanceled states. |
This enum type describes the state of a gesture.
This enum was introduced or modified in Qt 4.6.
See also QGesture.
Enumerator | |
---|---|
GestureCanceled |
A gesture was canceled. |
GestureFinished |
A gesture has finished. |
GestureStarted |
A continuous gesture has started. |
GestureUpdated |
A gesture continues. |
NoGesture |
This enum type describes the standard gestures.
User-defined gestures are registered with the QGestureRecognizer::registerRecognizer() function which generates a custom gesture ID with the Qt::CustomGesture flag set.
This enum was introduced or modified in Qt 4.6.
See also QGesture, QWidget::grabGesture(), and QGraphicsObject::grabGesture().
Qt's predefined QColor objects:
See also QColor.
The options marked "(default)" are set if no other values from the list are included (since the defaults are zero):
Color/Mono preference (ignored for QBitmap):
Dithering mode preference for RGB channels:
Dithering mode preference for alpha channel:
Color matching versus dithering preference:
Don't do any format conversions on the image. Can be useful when converting a QImage to a QPixmap for a one-time rendering operation for example.
Flags that alter the behavior:
Flags that restrict input (exclusive flags):
Masks:
Note: If several exclusive flags are ORed together, the resulting character set will consist of the union of the specified sets. For instance specifying ImhNumbersOnly and ImhUppercaseOnly would yield a set consisting of numbers and uppercase letters.
See also QGraphicsItem::inputMethodHints().
Each item in the model has a set of data elements associated with it, each with its own role. The roles are used by the view to indicate to the model which type of data it needs. Custom models should return data in these types.
The general purpose roles (and the associated types) are:
Roles describing appearance and meta data (with associated types):
Accessibility roles (with associated types):
User roles:
For user roles, it is up to the developer to decide which types to use and ensure that components use the correct types when accessing and setting data.
Enumerator | |
---|---|
AccessibleDescriptionRole |
A description of the item for accessibility purposes. (QString) |
AccessibleTextRole |
The text to be used by accessibility extensions and plugins, such as screen readers. (QString) |
BackgroundColorRole |
This role is obsolete. Use BackgroundRole instead. |
BackgroundRole |
The background brush used for items rendered with the default delegate. (QBrush) |
CheckStateRole |
This role is used to obtain the checked state of an item. (Qt::CheckState) |
DecorationPropertyRole | |
DecorationRole |
The data to be rendered as a decoration in the form of an icon. (QColor, QIcon or QPixmap) |
DisplayPropertyRole | |
DisplayRole |
The key data to be rendered in the form of text. (QString) |
EditRole |
The data in a form suitable for editing in an editor. (QString) |
FontRole |
The font used for items rendered with the default delegate. (QFont) |
ForegroundRole |
The foreground brush (text color, typically) used for items rendered with the default delegate. (QBrush) |
InitialSortOrderRole |
This role is used to obtain the initial sort order of a header view section. (Qt::SortOrder). This role was introduced in Qt 4.8. |
SizeHintRole |
The size hint for the item that will be supplied to views. (QSize) |
StatusTipPropertyRole | |
StatusTipRole |
The data displayed in the status bar. (QString) |
TextAlignmentRole |
The alignment of the text for items rendered with the default delegate. (Qt::AlignmentFlag) |
TextColorRole |
This role is obsolete. Use ForegroundRole instead. |
ToolTipPropertyRole | |
ToolTipRole |
The data displayed in the item's tooltip. (QString) |
UserRole |
The first role that can be used for application-specific purposes. |
WhatsThisPropertyRole | |
WhatsThisRole |
The data displayed for the item in "What's This?" mode. (QString) |
enum QtCore.Qt.ItemFlag |
This enum describes the properties of an item:
Note that checkable items need to be given both a suitable set of flags and an initial state, indicating whether the item is checked or not. This is handled automatically for model/view components, but needs to be explicitly set for instances of QListWidgetItem, QTableWidgetItem, and QTreeWidgetItem.
See also QAbstractItemModel.
This enum is used in QGraphicsItem, QGraphicsScene and QGraphicsView to specify how items are selected, or how to determine if a shapes and items collide.
See also QGraphicsScene::items(), QGraphicsScene::collidingItems(), QGraphicsView::items(), QGraphicsItem::collidesWithItem(), and QGraphicsItem::collidesWithPath().
enum QtCore.Qt.Key |
The key names used by Qt.
See also QKeyEvent::key().
Enumerator | |
---|---|
Key_0 | |
Key_1 | |
Key_2 | |
Key_3 | |
Key_4 | |
Key_5 | |
Key_6 | |
Key_7 | |
Key_8 | |
Key_9 | |
Key_A | |
Key_AE | |
Key_Aacute | |
Key_Acircumflex | |
Key_AddFavorite | |
Key_Adiaeresis | |
Key_Agrave | |
Key_Alt | |
Key_AltGr |
On Windows, when the KeyDown event for this key is sent, the Ctrl+Alt modifiers are also set. |
Key_Ampersand | |
Key_Any | |
Key_Apostrophe | |
Key_ApplicationLeft | |
Key_ApplicationRight | |
Key_Aring | |
Key_AsciiCircum | |
Key_AsciiTilde | |
Key_Asterisk | |
Key_At | |
Key_Atilde | |
Key_AudioCycleTrack | |
Key_AudioForward | |
Key_AudioRandomPlay | |
Key_AudioRepeat | |
Key_AudioRewind | |
Key_Away | |
Key_B | |
Key_Back | |
Key_BackForward | |
Key_Backslash | |
Key_Backspace | |
Key_Backtab | |
Key_Bar | |
Key_BassBoost | |
Key_BassDown | |
Key_BassUp | |
Key_Battery | |
Key_Bluetooth | |
Key_Book | |
Key_BraceLeft | |
Key_BraceRight | |
Key_BracketLeft | |
Key_BracketRight | |
Key_BrightnessAdjust | |
Key_C | |
Key_CD | |
Key_Calculator |
On X11 this key is not mapped for legacy reasons. Use Qt::Key_Launch1 instead. |
Key_Calendar | |
Key_Call |
A key to answer or initiate a call (see Qt::Key_ToggleCallHangup for a key to toggle current call state) |
Key_Camera |
A key to activate the camera shutter |
Key_CameraFocus |
A key to focus the camera |
Key_Cancel | |
Key_CapsLock | |
Key_Ccedilla | |
Key_Clear | |
Key_ClearGrab | |
Key_Close | |
Key_Codeinput | |
Key_Colon | |
Key_Comma | |
Key_Community | |
Key_Context1 | |
Key_Context2 | |
Key_Context3 | |
Key_Context4 | |
Key_ContrastAdjust | |
Key_Control |
On Mac OS X, this corresponds to the Command keys. |
Key_Copy | |
Key_Cut | |
Key_D | |
Key_DOS | |
Key_Dead_Abovedot | |
Key_Dead_Abovering | |
Key_Dead_Acute | |
Key_Dead_Belowdot | |
Key_Dead_Breve | |
Key_Dead_Caron | |
Key_Dead_Cedilla | |
Key_Dead_Circumflex | |
Key_Dead_Diaeresis | |
Key_Dead_Doubleacute | |
Key_Dead_Grave | |
Key_Dead_Hook | |
Key_Dead_Horn | |
Key_Dead_Iota | |
Key_Dead_Macron | |
Key_Dead_Ogonek | |
Key_Dead_Semivoiced_Sound | |
Key_Dead_Tilde | |
Key_Dead_Voiced_Sound | |
Key_Delete | |
Key_Direction_L | |
Key_Direction_R | |
Key_Display | |
Key_Documents | |
Key_Dollar | |
Key_Down | |
Key_E | |
Key_ETH | |
Key_Eacute | |
Key_Ecircumflex | |
Key_Ediaeresis | |
Key_Egrave | |
Key_Eisu_Shift | |
Key_Eisu_toggle | |
Key_Eject | |
Key_End | |
Key_Enter |
Typically located on the keypad. |
Key_Equal | |
Key_Escape | |
Key_Excel | |
Key_Exclam | |
Key_Execute | |
Key_Explorer | |
Key_F | |
Key_F1 | |
Key_F10 | |
Key_F11 | |
Key_F12 | |
Key_F13 | |
Key_F14 | |
Key_F15 | |
Key_F16 | |
Key_F17 | |
Key_F18 | |
Key_F19 | |
Key_F2 | |
Key_F20 | |
Key_F21 | |
Key_F22 | |
Key_F23 | |
Key_F24 | |
Key_F25 | |
Key_F26 | |
Key_F27 | |
Key_F28 | |
Key_F29 | |
Key_F3 | |
Key_F30 | |
Key_F31 | |
Key_F32 | |
Key_F33 | |
Key_F34 | |
Key_F35 | |
Key_F4 | |
Key_F5 | |
Key_F6 | |
Key_F7 | |
Key_F8 | |
Key_F9 | |
Key_Favorites | |
Key_Finance | |
Key_Flip | |
Key_Forward | |
Key_G | |
Key_Game | |
Key_Go | |
Key_Greater | |
Key_H | |
Key_Hangul | |
Key_Hangul_Banja | |
Key_Hangul_End | |
Key_Hangul_Hanja | |
Key_Hangul_Jamo | |
Key_Hangul_Jeonja | |
Key_Hangul_PostHanja | |
Key_Hangul_PreHanja | |
Key_Hangul_Romaja | |
Key_Hangul_Special | |
Key_Hangul_Start | |
Key_Hangup |
A key to end an ongoing call (see Qt::Key_ToggleCallHangup for a key to toggle current call state) |
Key_Hankaku | |
Key_Help | |
Key_Henkan | |
Key_Hibernate | |
Key_Hiragana | |
Key_Hiragana_Katakana | |
Key_History | |
Key_Home | |
Key_HomePage | |
Key_HotLinks | |
Key_Hyper_L | |
Key_Hyper_R | |
Key_I | |
Key_Iacute | |
Key_Icircumflex | |
Key_Idiaeresis | |
Key_Igrave | |
Key_Insert | |
Key_J | |
Key_K | |
Key_Kana_Lock | |
Key_Kana_Shift | |
Key_Kanji | |
Key_Katakana | |
Key_KeyboardBrightnessDown | |
Key_KeyboardBrightnessUp | |
Key_KeyboardLightOnOff | |
Key_L | |
Key_LastNumberRedial | |
Key_Launch0 |
On X11 this key is mapped to "My Computer" (XF86XK_MyComputer) key for legacy reasons. |
Key_Launch1 |
On X11 this key is mapped to "Calculator" (XF86XK_Calculator) key for legacy reasons. |
Key_Launch2 |
On X11 this key is mapped to XF86XK_Launch0 key for legacy reasons. |
Key_Launch3 |
On X11 this key is mapped to XF86XK_Launch1 key for legacy reasons. |
Key_Launch4 |
On X11 this key is mapped to XF86XK_Launch2 key for legacy reasons. |
Key_Launch5 |
On X11 this key is mapped to XF86XK_Launch3 key for legacy reasons. |
Key_Launch6 |
On X11 this key is mapped to XF86XK_Launch4 key for legacy reasons. |
Key_Launch7 |
On X11 this key is mapped to XF86XK_Launch5 key for legacy reasons. |
Key_Launch8 |
On X11 this key is mapped to XF86XK_Launch6 key for legacy reasons. |
Key_Launch9 |
On X11 this key is mapped to XF86XK_Launch7 key for legacy reasons. |
Key_LaunchA |
On X11 this key is mapped to XF86XK_Launch8 key for legacy reasons. |
Key_LaunchB |
On X11 this key is mapped to XF86XK_Launch9 key for legacy reasons. |
Key_LaunchC |
On X11 this key is mapped to XF86XK_LaunchA key for legacy reasons. |
Key_LaunchD |
On X11 this key is mapped to XF86XK_LaunchB key for legacy reasons. |
Key_LaunchE |
On X11 this key is mapped to XF86XK_LaunchC key for legacy reasons. |
Key_LaunchF |
On X11 this key is mapped to XF86XK_LaunchD key for legacy reasons. |
Key_LaunchG |
On X11 this key is mapped to XF86XK_LaunchE key for legacy reasons. |
Key_LaunchH |
On X11 this key is mapped to XF86XK_LaunchF key for legacy reasons. |
Key_LaunchMail | |
Key_LaunchMedia | |
Key_Left | |
Key_Less | |
Key_LightBulb | |
Key_LogOff | |
Key_M | |
Key_MailForward | |
Key_Market | |
Key_Massyo | |
Key_MediaLast | |
Key_MediaNext | |
Key_MediaPause |
A key setting the state of the media player to pause (Note: not the pause/break key) |
Key_MediaPlay |
A key setting the state of the media player to play |
Key_MediaPrevious | |
Key_MediaRecord | |
Key_MediaStop |
A key setting the state of the media player to stop |
Key_MediaTogglePlayPause |
A key to toggle the play/pause state in the media player (rather than setting an absolute state) |
Key_Meeting | |
Key_Memo | |
Key_Menu | |
Key_MenuKB | |
Key_MenuPB | |
Key_Messenger | |
Key_Meta |
On Mac OS X, this corresponds to the Control keys. On Windows keyboards, this key is mapped to the Windows key. |
Key_Minus | |
Key_Mode_switch | |
Key_MonBrightnessDown | |
Key_MonBrightnessUp | |
Key_Muhenkan | |
Key_Multi_key | |
Key_MultipleCandidate | |
Key_Music | |
Key_MySites | |
Key_N | |
Key_News | |
Key_No | |
Key_Ntilde | |
Key_NumLock | |
Key_NumberSign | |
Key_O | |
Key_Oacute | |
Key_Ocircumflex | |
Key_Odiaeresis | |
Key_OfficeHome | |
Key_Ograve | |
Key_Ooblique | |
Key_OpenUrl | |
Key_Option | |
Key_Otilde | |
Key_P | |
Key_PageDown | |
Key_PageUp | |
Key_ParenLeft | |
Key_ParenRight | |
Key_Paste | |
Key_Pause |
The Pause/Break key (Note: Not anything to do with pausing media) |
Key_Percent | |
Key_Period | |
Key_Phone | |
Key_Pictures | |
Key_Play | |
Key_Plus | |
Key_PowerDown | |
Key_PowerOff | |
Key_PreviousCandidate | |
Key_Print | |
Key_Printer | |
Key_Q | |
Key_Question | |
Key_QuoteDbl | |
Key_QuoteLeft | |
Key_R | |
Key_Refresh | |
Key_Reload | |
Key_Reply | |
Key_Return | |
Key_Right | |
Key_Romaji | |
Key_RotateWindows | |
Key_RotationKB | |
Key_RotationPB | |
Key_S | |
Key_Save | |
Key_ScreenSaver | |
Key_ScrollLock | |
Key_Search | |
Key_Select | |
Key_Semicolon | |
Key_Send | |
Key_Shift | |
Key_Shop | |
Key_SingleCandidate | |
Key_Slash | |
Key_Sleep | |
Key_Space | |
Key_Spell | |
Key_SplitScreen | |
Key_Standby | |
Key_Stop | |
Key_Subtitle | |
Key_Super_L | |
Key_Super_R | |
Key_Support | |
Key_Suspend | |
Key_SysReq | |
Key_T | |
Key_THORN | |
Key_Tab | |
Key_TaskPane | |
Key_Terminal | |
Key_Time | |
Key_ToDoList | |
Key_ToggleCallHangup |
A key to toggle the current call state (ie. either answer, or hangup) depending on current call state |
Key_Tools | |
Key_TopMenu | |
Key_Touroku | |
Key_Travel | |
Key_TrebleDown | |
Key_TrebleUp | |
Key_U | |
Key_UWB | |
Key_Uacute | |
Key_Ucircumflex | |
Key_Udiaeresis | |
Key_Ugrave | |
Key_Underscore | |
Key_Up | |
Key_V | |
Key_Video | |
Key_View | |
Key_VoiceDial | |
Key_VolumeDown | |
Key_VolumeMute | |
Key_VolumeUp | |
Key_W | |
Key_WLAN | |
Key_WWW | |
Key_WakeUp | |
Key_WebCam | |
Key_Word | |
Key_X | |
Key_Xfer | |
Key_Y | |
Key_Yacute | |
Key_Yes | |
Key_Z | |
Key_Zenkaku | |
Key_Zenkaku_Hankaku | |
Key_Zoom | |
Key_ZoomIn | |
Key_ZoomOut | |
Key_acute | |
Key_brokenbar | |
Key_cedilla | |
Key_cent | |
Key_copyright | |
Key_currency | |
Key_degree | |
Key_diaeresis | |
Key_division | |
Key_exclamdown | |
Key_guillemotleft | |
Key_guillemotright | |
Key_hyphen | |
Key_iTouch | |
Key_macron | |
Key_masculine | |
Key_mu | |
Key_multiply | |
Key_nobreakspace | |
Key_notsign | |
Key_onehalf | |
Key_onequarter | |
Key_onesuperior | |
Key_ordfeminine | |
Key_paragraph | |
Key_periodcentered | |
Key_plusminus | |
Key_questiondown | |
Key_registered | |
Key_section | |
Key_ssharp | |
Key_sterling | |
Key_threequarters | |
Key_threesuperior | |
Key_twosuperior | |
Key_unknown | |
Key_ydiaeresis | |
Key_yen |
This enum describes the modifier keys.
Note: On Mac OS X, the ControlModifier value corresponds to the Command keys on the Macintosh keyboard, and the MetaModifier value corresponds to the Control keys. The KeypadModifier value will also be set when an arrow key is pressed as the arrow keys are considered part of the keypad.
Note: On Windows Keyboards, Qt::MetaModifier and Qt::Key_Meta are mapped to the Windows key.
See also MouseButton and Modifier.
Specifies the direction of Qt's layouts and text handling.
Right-to-left layouts are necessary for certain languages, notably Arabic and Hebrew.
LayoutDirectionAuto serves two purposes. When used in conjunction with widgets and layouts, it will imply to use the layout direction set on the parent widget or QApplication. This has the same effect as QWidget::unsetLayoutDirection().
When LayoutDirectionAuto is used in conjunction with text layouting, it will imply that the text directionality is determined from the content of the string to be layouted.
See also QApplication::setLayoutDirection(), QWidget::setLayoutDirection(), QTextOption::setTextDirection(), and QString::isRightToLeft().
Enumerator | |
---|---|
LayoutDirectionAuto |
Automatic layout. |
LeftToRight |
Left-to-right layout. |
RightToLeft |
Right-to-left layout. |
enum QtCore.Qt.MaskMode |
enum QtCore.Qt.MatchFlag |
This enum describes the type of matches that can be used when searching for items in a model.
See also QString::compare() and QRegExp.
enum QtCore.Qt.Modifier |
This enum provides shorter names for the keyboard modifier keys supported by Qt.
Note: On Mac OS X, the CTRL value corresponds to the Command keys on the Macintosh keyboard, and the META value corresponds to the Control keys.
See also KeyboardModifier and MouseButton.
Enumerator | |
---|---|
ALT |
The normal Alt keys, but not keys like AltGr. |
CTRL |
The Ctrl keys. |
META |
The Meta keys. |
MODIFIER_MASK | |
SHIFT |
The Shift keys provided on all standard keyboards. |
UNICODE_ACCEL |
The shortcut is specified as a Unicode code point, not as a Qt Key. |
This enum type describes the different mouse buttons.
See also KeyboardModifier and Modifier.
This enum type describes the mode for moving focus.
Note:: in 4.6, cursor navigation is only implemented for Symbian OS. On other platforms, it behaves as NavigationModeNone.
This enum was introduced or modified in Qt 4.6.
See also QApplication::setNavigationMode() and QApplication::navigationMode().
Enumerator | |
---|---|
NavigationModeCursorAuto |
The mouse cursor is used to change focus, it is displayed only on non touchscreen devices. The keypad is used to implement a virtual cursor, unless the device has an analog mouse type of input device (e.g. touchpad). This is the recommended setting for an application such as a web browser that needs pointer control on both touch and non-touch devices. |
NavigationModeCursorForceVisible |
The mouse cursor is used to change focus, it is displayed regardless of device type. The keypad is used to implement a virtual cursor, unless the device has an analog mouse type of input device (e.g. touchpad) |
NavigationModeKeypadDirectional |
Qt::Key_Up, Qt::Key_Down, Qt::Key_Left and Qt::Key_Right are used to change focus. |
NavigationModeKeypadTabOrder |
Qt::Key_Up and Qt::Key_Down are used to change focus. |
NavigationModeNone |
Only the touch screen is used. |
This enum type defines the pen cap styles supported by Qt, i.e. the line end caps that can be drawn using QPainter.
Qt::SquareCap Qt::FlatCap Qt::RoundCap
See also QPen.
This enum type defines the pen join styles supported by Qt, i.e. which joins between two connected lines can be drawn using QPainter.
Qt::BevelJoin Qt::MiterJoin Qt::RoundJoin
See also QPen.
enum QtCore.Qt.PenStyle |
This enum type defines the pen styles that can be drawn using QPainter. The styles are:
Qt::SolidLine Qt::DashLine Qt::DotLine
Qt::DashDotLine Qt::DashDotDotLine Qt::CustomDashLine
See also QPen.
This enum type describes the various modes of QAbstractScrollArea's scroll bars.
(The modes for the horizontal and vertical scroll bars are independent.)
For a QEvent::Shortcut event to occur, the shortcut's key sequence must be entered by the user in a context where the shortcut is active. The possible contexts are these:
enum QtCore.Qt.SizeHint |
This enum is used by QGraphicsLayoutItem::sizeHint()
This enum was introduced or modified in Qt 4.4.
See also QGraphicsLayoutItem::sizeHint().
enum QtCore.Qt.SizeMode |
This enum is used by QPainter::drawRoundedRect() and QPainterPath::addRoundedRect() functions to specify the radii of rectangle corners with respect to the dimensions of the bounding rectangles specified.
This enum was introduced or modified in Qt 4.4.
Enumerator | |
---|---|
AbsoluteSize |
Specifies the size using absolute measurements. |
RelativeSize |
Specifies the size relative to the bounding rectangle, typically using percentage measurements. |
enum QtCore.Qt.SortOrder |
This enum specifies where the ellipsis should appear when displaying texts that don't fit:
Qt::ElideMiddle is normally the most appropriate choice for URLs (e.g., "http://bugreports.qt.../QTWEBSITE-13/"), whereas Qt::ElideRight is appropriate for other strings (e.g., "Deploying Applications on Ma...").
See also QAbstractItemView::textElideMode, QFontMetrics::elidedText(), AlignmentFlag, and QTabBar::elideMode.
enum QtCore.Qt.TextFlag |
This enum type is used to define some modifier flags. Some of these flags only make sense in the context of printing:
Ensures that the longest variant is always used when computing the size of a multi-variant string. (Internal)
You can use as many modifier flags as you want, except that Qt::TextSingleLine and Qt::TextWordWrap cannot be combined.
Flags that are inappropriate for a given use are generally ignored.
Enumerator | |
---|---|
TextBypassShaping | |
TextDontClip |
If it's impossible to stay within the given bounds, it prints outside. |
TextDontPrint |
Treat this text as "hidden" and don't print it. |
TextExpandTabs |
Makes the U+0009 (ASCII tab) character move to the next tab stop. |
TextForceLeftToRight | |
TextForceRightToLeft | |
TextHideMnemonic |
Same as Qt::TextShowMnemonic but doesn't draw the underlines. |
TextIncludeTrailingSpaces |
Same as IncludeTrailingSpaces |
TextJustificationForced |
Ensures that text lines are justified. |
TextLongestVariant | |
TextShowMnemonic |
Displays the string "&P" as P (see QButton for an example). For an ampersand, use "&&". |
TextSingleLine |
Treats all whitespace as spaces and prints just one line. |
TextWordWrap |
Breaks lines at appropriate points, e.g. at word boundaries. |
TextWrapAnywhere |
Breaks lines anywhere, even within words. |
enum QtCore.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 one or the other. This is normally done by passing one of the enum values to a setTextFormat() function.
Enumerator | |
---|---|
AutoText |
The text string is interpreted as for Qt::RichText if Qt::mightBeRichText() returns true, otherwise as Qt::PlainText. |
LogText |
A special, limited text format which is only used by Q3TextEdit in an optimized mode. |
PlainText |
The text string is interpreted as a plain text string. |
RichText |
The text string is interpreted as a rich text string. |
This enum specifies how a text displaying widget reacts to user input.
enum QtCore.Qt.TileRule |
This enum describes how to repeat or stretch the parts of an image when drawing.
This enum was introduced or modified in Qt 4.6.
enum QtCore.Qt.TimeSpec |
The style of the tool button, describing how the button's text and icon should be displayed.
This enum represents the state of a touch point at the time the QTouchEvent occurred.
This enum was introduced or modified in Qt 4.6.
enum QtCore.Qt.UIEffect |
This enum describes the available UI effects.
By default, Qt will try to use the platform specific desktop settings for each effect. Use the QApplication::setDesktopSettingsAware() function (passing false as argument) to prevent this, and the QApplication::setEffectEnabled() to enable or disable a particular effect.
Note that all effects are disabled on screens running at less than 16-bit color depth.
See also QApplication::setEffectEnabled() and QApplication::setDesktopSettingsAware().
This enum type is used to specify various widget attributes. Attributes are set and cleared with QWidget::setAttribute(), and queried with QWidget::testAttribute(), although some have special convenience functions which are mentioned below.
Warning: This flag must never be set or cleared by the widget's author.
Enumerator | |
---|---|
WA_AcceptDrops |
Allows data from drag and drop operations to be dropped onto the widget (see QWidget::setAcceptDrops()). |
WA_AcceptTouchEvents |
Allows touch events (see QTouchEvent) to be sent to the widget. Must be set on all widgets that can handle touch events. Without this attribute set, events from a touch device will be sent as mouse events. |
WA_AlwaysShowToolTips |
Enables tooltips for inactive windows. |
WA_AttributeCount | |
WA_AutoOrientation |
Causes the widget to change orientation whenever the display changes orientation with respect to the user. |
WA_CanHostQMdiSubWindowTitleBar | |
WA_ContentsPropagated |
This flag is superfluous and obsolete; it no longer has any effect. Since Qt 4.1, all widgets that do not set WA_PaintOnScreen propagate their contents. |
WA_CustomWhatsThis |
Indicates that the widget wants to continue operating normally in "What's This?" mode. This is set by the widget's author. |
WA_DeleteOnClose |
Makes Qt delete this widget when the widget has accepted the close event (see QWidget::closeEvent()). |
WA_Disabled |
Indicates that the widget is disabled, i.e. it does not receive any mouse or keyboard events. There is also a getter functions QWidget::isEnabled(). This is set/cleared by the Qt kernel. |
WA_DontCreateNativeAncestors |
Indicates that the widget's ancestors are kept non-native even though the widget itself is native. |
WA_DontShowOnScreen |
Indicates that the widget is hidden or is not a part of the viewable Desktop. |
WA_DropSiteRegistered | |
WA_ForceAcceptDrops | |
WA_ForceDisabled |
Indicates that the widget is explicitly disabled, i.e. it will remain disabled even when all its ancestors are set to the enabled state. This implies WA_Disabled. This is set/cleared by QWidget::setEnabled() and QWidget::setDisabled(). |
WA_ForceUpdatesDisabled |
Indicates that updates are explicitly disabled for the widget; i.e. it will remain disabled even when all its ancestors are set to the updates-enabled state. This implies WA_UpdatesDisabled. This is set/cleared by QWidget::setUpdatesEnabled(). |
WA_GrabbedShortcut | |
WA_GroupLeader |
This attribute has been deprecated. Use QWidget::windowModality instead. |
WA_Hover |
Forces Qt to generate paint events when the mouse enters or leaves the widget. This feature is typically used when implementing custom styles; see the Styles example for details. |
WA_InputMethodEnabled |
Enables input methods for Asian languages. Must be set when creating custom text editing widgets. On Windows CE and Symbian this flag can be used in addition to QApplication::autoSipEnabled to automatically display the SIP when entering a widget. |
WA_InputMethodTransparent | |
WA_InvalidSize | |
WA_KeyCompression |
Enables key event compression if set, and disables it if not set. By default key compression is off, so widgets receive one key press event for each key press (or more, since autorepeat is usually on). If you turn it on and your program doesn't keep up with key input, Qt may try to compress key events so that more than one character can be processed in each event. For example, a word processor widget might receive 2, 3 or more characters in each QKeyEvent::text(), if the layout recalculation takes too long for the CPU. If a widget supports multiple character unicode input, it is always safe to turn the compression on. Qt performs key event compression only for printable characters. Qt::Modifier keys, cursor movement keys, function keys and miscellaneous action keys (e.g. Escape, Enter, Backspace, PrintScreen) will stop key event compression, even if there are more compressible key events available. Platforms other than Mac and X11 do not support this compression, in which case turning it on will have no effect. This is set/cleared by the widget's author. |
WA_KeyboardFocusChange |
Set on a toplevel window when the users changes focus with the keyboard (tab, backtab, or shortcut). |
WA_LaidOut | |
WA_LayoutOnEntireRect |
Indicates that the widget wants QLayout to operate on the entire QWidget::rect(), not only on QWidget::contentsRect(). This is set by the widget's author. |
WA_LayoutUsesWidgetRect |
Ignore the layout item rect from the style when laying out this widget with QLayout. This makes a difference in QMacStyle and QPlastiqueStyle for some widgets. |
WA_LockLandscapeOrientation |
Locks the widget to a landscape orientation, ignoring changes to the display's orientation with respect to the user. |
WA_LockPortraitOrientation |
Locks the widget to a portrait orientation, ignoring changes to the display's orientation with respect to the user. |
WA_MSWindowsUseDirect3D |
This value is obsolete and has no effect. |
WA_MacAlwaysShowToolWindow |
On Mac OS X, show the tool window even when the application is not active. By default, all tool windows are hidden when the application is inactive. |
WA_MacBrushedMetal |
Indicates the widget should be drawn in the brushed metal style as supported by the windowing system. This attribute is only applicable to Mac OS X. |
WA_MacFrameworkScaled |
Enables resolution independence aware mode on Mac when using Carbon. This attribute has no effect on Cocoa. The attribute is off by default and can be enabled on a per-window basis. |
WA_MacMetalStyle | |
WA_MacMiniSize |
Indicates the widget should have the mini size for widgets in Mac OS X. This attribute is only applicable to Mac OS X. |
WA_MacNoClickThrough |
When a widget that has this attribute set is clicked, and its window is inactive, the click will make the window active but won't be seen by the widget. Typical use of this attribute is on widgets with "destructive" actions, such as a "Delete" button. WA_MacNoClickThrough also applies to all child widgets of the widget that has it set. |
WA_MacNoShadow |
Since Qt 4.8, this attribute disables drop shadows for this top level window. Only affects Cocoa builds of Qt for Mac OS X. |
WA_MacNormalSize |
Indicates the widget should have the normal size for widgets in Mac OS X. This attribute is only applicable to Mac OS X. |
WA_MacOpaqueSizeGrip |
Indicates that the native Carbon size grip should be opaque instead of transparent (the default). This attribute is only applicable to Mac OS X and is set by the widget's author. |
WA_MacShowFocusRect |
Indicates that this widget should get a QFocusFrame around it. Some widgets draw their own focus halo regardless of this attribute. Not that the QWidget::focusPolicy also plays the main role in whether something is given focus or not, this only controls whether or not this gets the focus frame. This attribute is only applicable to Mac OS X. |
WA_MacSmallSize |
Indicates the widget should have the small size for widgets in Mac OS X. This attribute is only applicable to Mac OS X. |
WA_MacVariableSize |
Indicates the widget can choose between alternative sizes for widgets to avoid clipping. This attribute is only applicable to Mac OS X. |
WA_Mapped |
Indicates that the widget is mapped on screen. This is set/cleared by the Qt kernel. |
WA_MergeSoftkeys |
Allows widget to merge softkeys with parent widget, i.e. widget can set only one softkeys and request softkey implementation to take rest of the softkeys from the parent. Note parents are traversed until WA_MergeSoftkeys is not set. See also Qt::WA_MergeSoftkeysRecursively This attribute currently has effect only on Symbian platforms |
WA_MergeSoftkeysRecursively |
Allows widget to merge softkeys recursively with all parents. If this attribute is set, the widget parents are traversed until window boundary (widget without parent or dialog) is found. This attribute currently has effect only on Symbian platforms |
WA_MouseNoMask |
Makes the widget receive mouse events for the entire widget regardless of the currently set mask, overriding QWidget::setMask(). This is not applicable for top-level windows. |
WA_MouseTracking |
Indicates that the widget has mouse tracking enabled. See QWidget::mouseTracking. |
WA_Moved |
Indicates that the widget has an explicit position. This is set/cleared by QWidget::move() and by QWidget::setGeometry(). |
WA_NativeWindow |
Indicates that a native window is created for the widget. Enabling this flag will also force a native window for the widget's ancestors unless Qt::WA_DontCreateNativeAncestors is set. |
WA_NoBackground |
This value is obsolete. Use WA_OpaquePaintEvent instead. |
WA_NoChildEventsForParent |
Indicates that the widget does not want ChildAdded or ChildRemoved events sent to its parent. This is rarely necessary but can help to avoid automatic insertion widgets like splitters and layouts. This is set by a widget's author. |
WA_NoChildEventsFromChildren |
Indicates that the widget does not want to receive ChildAdded or ChildRemoved events sent from its children. This is set by a widget's author. |
WA_NoMousePropagation |
Prohibits mouse events from being propagated to the widget's parent. This attribute is disabled by default. |
WA_NoMouseReplay |
Used for pop-up widgets. Indicates that the most recent mouse press event should not be replayed when the pop-up widget closes. The flag is set by the widget's author and cleared by the Qt kernel every time the widget receives a new mouse event. |
WA_NoSystemBackground |
Indicates that the widget has no background, i.e. when the widget receives paint events, the background is not automatically repainted. Note: Unlike WA_OpaquePaintEvent, newly exposed areas are never filled with the background (e.g., after showing a window for the first time the user can see "through" it until the application processes the paint events). This flag is set or cleared by the widget's author. |
WA_NoX11EventCompression | |
WA_OpaquePaintEvent |
Indicates that the widget paints all its pixels when it receives a paint event. Thus, it is not required for operations like updating, resizing, scrolling and focus changes to erase the widget before generating paint events. The use of WA_OpaquePaintEvent provides a small optimization by helping to reduce flicker on systems that do not support double buffering and avoiding computational cycles necessary to erase the background prior to painting. Note: Unlike WA_NoSystemBackground, WA_OpaquePaintEvent makes an effort to avoid transparent window backgrounds. This flag is set or cleared by the widget's author. |
WA_OutsideWSRange |
Indicates that the widget is outside the valid range of the window system's coordinate system. A widget outside the valid range cannot be mapped on screen. This is set/cleared by the Qt kernel. |
WA_PaintOnScreen |
Indicates that the widget wants to draw directly onto the screen. Widgets with this attribute set do not participate in composition management, i.e. they cannot be semi-transparent or shine through semi-transparent overlapping widgets. Note: This flag is only supported on X11 and it disables double buffering. On Qt for Embedded Linux, the flag only works when set on a top-level widget and it relies on support from the active screen driver. This flag is set or cleared by the widget's author. To render outside of Qt's paint system, e.g., if you require native painting primitives, you need to reimplement QWidget::paintEngine() to return 0 and set this flag. |
WA_PaintOutsidePaintEvent |
Makes it possible to use QPainter to paint on the widget outside paintEvent(). This flag is not supported on Windows, Mac OS X or Embedded Linux. We recommend that you use it only when porting Qt 3 code to Qt 4. |
WA_PaintUnclipped |
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. This flag is only supported for widgets with the WA_PaintOnScreen flag set. The preferred way to do this in a cross platform way is to create a transparent widget that lies in front of the other widgets. |
WA_PendingMoveEvent |
Indicates that a move event is pending, e.g., when a hidden widget was moved. This flag is set or cleared by the Qt kernel. |
WA_PendingResizeEvent |
Indicates that a resize event is pending, e.g., when a hidden widget was resized. This flag is set or cleared by the Qt kernel. |
WA_PendingUpdate | |
WA_QuitOnClose |
Makes Qt quit the application when the last widget with the attribute set has accepted closeEvent(). This behavior can be modified with the QApplication::quitOnLastWindowClosed property. By default this attribute is set for all widgets of type Qt::Window. |
WA_Resized |
Indicates that the widget has an explicit size. This flag is set or cleared by QWidget::resize() and QWidget::setGeometry(). |
WA_RightToLeft |
Indicates that the layout direction for the widget is right to left. |
WA_SetCursor |
Indicates that the widget has a cursor of its own. This flag is set or cleared by QWidget::setCursor() and QWidget::unsetCursor(). |
WA_SetFont |
Indicates that the widget has a font of its own. This flag is set or cleared by QWidget::setFont(). |
WA_SetLayoutDirection | |
WA_SetLocale |
Indicates the locale should be taken into consideration in the widget. |
WA_SetPalette |
Indicates that the widget has a palette of its own. This flag is set or cleared by QWidget::setPalette(). |
WA_SetStyle |
Indicates that the widget has a style of its own. This flag is set or cleared by QWidget::setStyle(). |
WA_SetWindowIcon | |
WA_SetWindowModality | |
WA_ShowModal |
This attribute has been deprecated. Use QWidget::windowModality instead. |
WA_ShowWithoutActivating |
Show the widget without making it active. |
WA_StaticContents |
Indicates that the widget contents are north-west aligned and static. On resize, such a widget will receive paint events only for parts of itself that are newly visible. This flag is set or cleared by the widget's author. |
WA_StyleSheet |
Indicates that the widget is styled using a style sheet. |
WA_StyledBackground |
Indicates the widget should be drawn using a styled background. |
WA_SymbianNoSystemRotation | |
WA_TintedBackground | |
WA_TouchPadAcceptSingleTouchEvents |
Allows touchpad single touch events to be sent to the widget. |
WA_TranslucentBackground |
Indicates that the widget should have a translucent background, i.e., any non-opaque regions of the widgets will be translucent because the widget will have an alpha channel. Setting this flag causes WA_NoSystemBackground to be set. On Windows the widget also needs the Qt::FramelessWindowHint window flag to be set. This flag is set or cleared by the widget's author. |
WA_TransparentForMouseEvents |
When enabled, this attribute disables the delivery of mouse events to the widget and its children. Mouse events are delivered to other widgets as if the widget and its children were not present in the widget hierarchy; mouse clicks and other events effectively "pass through" them. This attribute is disabled by default. |
WA_UnderMouse |
Indicates that the widget is under the mouse cursor. The value is not updated correctly during drag and drop operations. There is also a getter function, QWidget::underMouse(). This flag is set or cleared by the Qt kernel. |
WA_UpdatesDisabled |
Indicates that updates are blocked (including the system background). This flag is set or cleared by the Qt kernel. |
WA_WState_AcceptedTouchBeginEvent | |
WA_WState_CompressKeys | |
WA_WState_ConfigPending | |
WA_WState_Created | |
WA_WState_DND | |
WA_WState_ExplicitShowHide | |
WA_WState_Hidden | |
WA_WState_InPaintEvent | |
WA_WState_OwnSizePolicy | |
WA_WState_Polished | |
WA_WState_Reparented | |
WA_WState_Visible | |
WA_WState_WindowOpacitySet | |
WA_WindowModified |
Indicates that the window is marked as modified. On some platforms this flag will do nothing, on others (including Mac OS X and Windows) the window will take a modified appearance. This flag is set or cleared by QWidget::setWindowModified(). |
WA_WindowPropagation |
Makes a toplevel window inherit font and palette from its parent. |
WA_X11BypassTransientForHint | |
WA_X11DoNotAcceptFocus |
Asks the window manager to not give focus to this top level window. This attribute has no effect on non-X11 platforms. |
WA_X11NetWmWindowTypeCombo |
Adds _NET_WM_WINDOW_TYPE_COMBO to the window's _NET_WM_WINDOW_TYPE X11 window property. See http://standards.freedesktop.org/wm-spec/ for more details. This attribute has no effect on non-X11 platforms. Note: Qt automatically sets this attribute for the QComboBox pop-up. |
WA_X11NetWmWindowTypeDND |
Adds _NET_WM_WINDOW_TYPE_DND to the window's _NET_WM_WINDOW_TYPE X11 window property. See http://standards.freedesktop.org/wm-spec/ for more details. This attribute has no effect on non-X11 platforms. Note: Qt automatically sets this attribute on the feedback widget used during a drag. |
WA_X11NetWmWindowTypeDesktop |
Adds _NET_WM_WINDOW_TYPE_DESKTOP to the window's _NET_WM_WINDOW_TYPE X11 window property. See http://standards.freedesktop.org/wm-spec/ for more details. This attribute has no effect on non-X11 platforms. |
WA_X11NetWmWindowTypeDialog |
Adds _NET_WM_WINDOW_TYPE_DIALOG to the window's _NET_WM_WINDOW_TYPE X11 window property. See http://standards.freedesktop.org/wm-spec/ for more details. This attribute has no effect on non-X11 platforms. Note: Qt automatically sets this attribute for the Qt::Dialog and Qt::Sheet window types. |
WA_X11NetWmWindowTypeDock |
Adds _NET_WM_WINDOW_TYPE_DOCK to the window's _NET_WM_WINDOW_TYPE X11 window property. See http://standards.freedesktop.org/wm-spec/ for more details. This attribute has no effect on non-X11 platforms. |
WA_X11NetWmWindowTypeDropDownMenu |
Adds _NET_WM_WINDOW_TYPE_DROPDOWN_MENU to the window's _NET_WM_WINDOW_TYPE X11 window property. See http://standards.freedesktop.org/wm-spec/ for more details. This attribute has no effect on non-X11 platforms. Note: Qt automatically sets this attribute for QMenus added to a QMenuBar. |
WA_X11NetWmWindowTypeMenu |
Adds _NET_WM_WINDOW_TYPE_MENU to the window's _NET_WM_WINDOW_TYPE X11 window property. See http://standards.freedesktop.org/wm-spec/ for more details. This attribute has no effect on non-X11 platforms. Note: Qt automatically sets this attribute for QMenu when torn-off. |
WA_X11NetWmWindowTypeNotification |
Adds _NET_WM_WINDOW_TYPE_NOTIFICATION to the window's _NET_WM_WINDOW_TYPE X11 window property. See http://standards.freedesktop.org/wm-spec/ for more details. This attribute has no effect on non-X11 platforms. |
WA_X11NetWmWindowTypePopupMenu |
Adds _NET_WM_WINDOW_TYPE_POPUP_MENU to the window's _NET_WM_WINDOW_TYPE X11 window property. See http://standards.freedesktop.org/wm-spec/ for more details. This attribute has no effect on non-X11 platforms. Note: Qt automatically sets this attribute for QMenu. |
WA_X11NetWmWindowTypeSplash |
Adds _NET_WM_WINDOW_TYPE_SPLASH to the window's _NET_WM_WINDOW_TYPE X11 window property. See http://standards.freedesktop.org/wm-spec/ for more details. This attribute has no effect on non-X11 platforms. Note: Qt automatically sets this attribute for the Qt::SplashScreen window type. |
WA_X11NetWmWindowTypeToolBar |
Adds _NET_WM_WINDOW_TYPE_TOOLBAR to the window's _NET_WM_WINDOW_TYPE X11 window property. See http://standards.freedesktop.org/wm-spec/ for more details. This attribute has no effect on non-X11 platforms. Note: Qt automaticaly sets this attribute for QToolBar. |
WA_X11NetWmWindowTypeToolTip |
Adds _NET_WM_WINDOW_TYPE_TOOLTIP to the window's _NET_WM_WINDOW_TYPE X11 window property. See http://standards.freedesktop.org/wm-spec/ for more details. This attribute has no effect on non-X11 platforms. Note: Qt automatically sets this attribute for the Qt::ToolTip window type. |
WA_X11NetWmWindowTypeUtility |
Adds _NET_WM_WINDOW_TYPE_UTILITY to the window's _NET_WM_WINDOW_TYPE X11 window property. See http://standards.freedesktop.org/wm-spec/ for more details. This attribute has no effect on non-X11 platforms. Note: Qt automatically sets this attribute for the Qt::Tool window type. |
WA_X11OpenGLOverlay |
This enum is used to describe parts of a window frame. It is returned by QGraphicsWidget::windowFrameSectionAt() to describe what section of the window frame is under the mouse.
This enum was introduced or modified in Qt 4.4.
See also QGraphicsWidget::windowFrameEvent(), QGraphicsWidget::paintWindowFrame(), and QGraphicsWidget::windowFrameSectionAt().
Enumerator | |
---|---|
BottomLeftSection | |
BottomRightSection | |
BottomSection | |
LeftSection | |
NoSection | |
RightSection | |
TitleBarArea | |
TopLeftSection | |
TopRightSection | |
TopSection |
This enum specifies the behavior of a modal window. A modal window is one that blocks input to other windows. Note that windows that are children of a modal window are not blocked.
The values are:
See also QWidget::windowModality and QDialog.
This enum type is used to specify the current state of a top-level window.
The states are
enum QtCore.Qt.WindowType |
This enum type is used to specify various window-system properties for the widget. They are fairly unusual but necessary in a few cases. Some of these flags depend on whether the underlying window manager supports them.
The main types are
There are also a number of flags which you can use to customize the appearance of top-level windows. These have no effect on other windows:
The CustomizeWindowHint flag is used to enable customization of the window controls. This flag must be set to allow the WindowTitleHint, WindowSystemMenuHint, WindowMinimizeButtonHint, WindowMaximizeButtonHint and WindowCloseButtonHint flags to be changed.
Obsolete flags:
See also QWidget::windowFlags and Window Flags Example.
Enumerator | |
---|---|
BypassGraphicsProxyWidget |
Prevents the window and its children from automatically embedding themselves into a QGraphicsProxyWidget if the parent widget is already embedded. You can set this flag if you want your widget to always be a toplevel widget on the desktop, regardless of whether the parent widget is embedded in a scene or not. |
CustomizeWindowHint |
Turns off the default window title hints. |
Desktop |
Indicates that this widget is the desktop. This is the type for QDesktopWidget. |
Dialog |
Indicates that the widget is a window that should be decorated as a dialog (i.e., typically no maximize or minimize buttons in the title bar). This is the default type for QDialog. If you want to use it as a modal dialog, it should be launched from another window, or have a parent and used with the QWidget::windowModality property. If you make it modal, the dialog will prevent other top-level windows in the application from getting any input. We refer to a top-level window that has a parent as a secondary window. |
Drawer |
Indicates that the widget is a Macintosh drawer. |
FramelessWindowHint |
Produces a borderless window. The user cannot move or resize a borderless window via the window system. On X11, the result of the flag is dependent on the window manager and its ability to understand Motif and/or NETWM hints. Most existing modern window managers can handle this. |
MSWindowsFixedSizeDialogHint |
Gives the window a thin dialog border on Windows. This style is traditionally used for fixed-size dialogs. |
MSWindowsOwnDC |
Gives the window its own display context on Windows. |
MacWindowToolBarButtonHint |
On Mac OS X adds a tool bar button (i.e., the oblong button that is on the top right of windows that have toolbars). |
Popup |
Indicates that the widget is a pop-up top-level window, i.e. that it is modal, but has a window system frame appropriate for pop-up menus. |
Sheet |
Indicates that the window is a Macintosh sheet. Since using a sheet implies window modality, the recommended way is to use QWidget::setWindowModality(), or QDialog::open(), instead. |
SplashScreen |
Indicates that the window is a splash screen. This is the default type for QSplashScreen. |
SubWindow |
Indicates that this widget is a sub-window, such as a QMdiSubWindow widget. |
Tool |
Indicates that the widget is a tool window. A tool window is often a small window with a smaller than usual title bar and decoration, typically used for collections of tool buttons. If there is a parent, the tool window will always be kept on top of it. If there isn't a parent, you may consider using Qt::WindowStaysOnTopHint as well. If the window system supports it, a tool window can be decorated with a somewhat lighter frame. It can also be combined with Qt::FramelessWindowHint. On Mac OS X, tool windows correspond to the Floating class of windows. This means that the window lives on a level above normal windows; it impossible to put a normal window on top of it. By default, tool windows will disappear when the application is inactive. This can be controlled by the Qt::WA_MacAlwaysShowToolWindow attribute. |
ToolTip |
Indicates that the widget is a tooltip. This is used internally to implement tooltips. |
Widget |
This is the default type for QWidget. Widgets of this type are child widgets if they have a parent, and independent windows if they have no parent. See also Qt::Window and Qt::SubWindow. |
Window |
Indicates that the widget is a window, usually with a window system frame and a title bar, irrespective of whether the widget has a parent or not. Note that it is not possible to unset this flag if the widget does not have a parent. |
WindowCancelButtonHint |
Adds a Cancel button to the window decoration of a dialog. Only supported for Windows CE. |
WindowCloseButtonHint |
Adds a close button. On some platforms this implies Qt::WindowSystemMenuHint for it to work. |
WindowContextHelpButtonHint |
Adds a context help button to dialogs. On some platforms this implies Qt::WindowSystemMenuHint for it to work. |
WindowMaximizeButtonHint |
Adds a maximize button. On some platforms this implies Qt::WindowSystemMenuHint for it to work. |
WindowMinMaxButtonsHint |
Adds a minimize and a maximize button. On some platforms this implies Qt::WindowSystemMenuHint for it to work. |
WindowMinimizeButtonHint |
Adds a minimize button. On some platforms this implies Qt::WindowSystemMenuHint for it to work. |
WindowOkButtonHint |
Adds an OK button to the window decoration of a dialog. Only supported for Windows CE. |
WindowShadeButtonHint | |
WindowSoftkeysRespondHint |
Makes softkeys to receive key events even when invisible. With this hint the softkey actions are triggered even the softkeys are invisible i.e. the window is displayed with showFullscreen(). Only supported for Symbian. |
WindowSoftkeysVisibleHint |
Makes softkeys visible when widget is fullscreen. Only supported for Symbian. |
WindowStaysOnBottomHint |
Informs the window system that the window should stay on bottom of all other windows. Note that on X11 this hint will work only in window managers that support _NET_WM_STATE_BELOW atom. If a window always on the bottom has a parent, the parent will also be left on the bottom. This window hint is currently not implemented for Mac OS X. |
WindowStaysOnTopHint |
Informs the window system that the window should stay on top of all other windows. Note that on some window managers on X11 you also have to pass Qt::X11BypassWindowManagerHint for this flag to work correctly. |
WindowSystemMenuHint |
Adds a window system menu, and possibly a close button (for example on Mac). If you need to hide or show a close button, it is more portable to use WindowCloseButtonHint. |
WindowTitleHint |
Gives the window a title bar. |
WindowType_Mask |
A mask for extracting the window type part of the window flags. |
X11BypassWindowManagerHint |
Bypass the window manager completely. This results in a borderless window that is not managed at all (i.e., no keyboard input unless you call QWidget::activateWindow() manually). |
delegate void QtCore.Qt.ActionQtMsgTypeString | ( | QtMsgType | qtMsgType, |
string @ | string | ||
) |
delegate QByteArray QtCore.Qt.FuncQByteArrayString | ( | string @ | string | ) |
delegate QObject QtCore.Qt.FuncQObject | ( | ) |
delegate QTextStream QtCore.Qt.FuncQTextStreamQTextStream | ( | QTextStream | qTextStream | ) |
delegate string QtCore.Qt.FuncStringQByteArray | ( | QByteArray | qByteArray | ) |
|
static |
Returns the arccosine of v as an angle in radians. Arccosine is the inverse operation of cosine.
See also qAtan(), qAsin(), and qCos().
|
static |
Adds a global routine that will be called from the QApplication destructor. This function is normally used to add cleanup routines for program-wide functionality.
The function specified by ptr should take no arguments and should return nothing. For example:
static int *global_ptr = 0;
static void cleanup_ptr()
{
delete [] global_ptr;
global_ptr = 0;
}
void init_ptr()
{
global_ptr = new int[100]; // allocate data
qAddPostRoutine(cleanup_ptr); // delete later
}
Note that for an application- or module-wide cleanup, qAddPostRoutine() is often not suitable. For example, if the program is split into dynamically loaded modules, the relevant module may be unloaded long before the QApplication destructor is called.
For modules and libraries, using a reference-counted initialization manager or Qt's parent-child deletion mechanism may be better. Here is an example of a private class that uses the parent-child mechanism to call a cleanup function at the right time:
class MyPrivateInitStuff : public QObject
{
public:
static MyPrivateInitStuff *initStuff(QObject *parent)
{
if (!p)
p = new MyPrivateInitStuff(parent);
return p;
}
~MyPrivateInitStuff()
{
// cleanup goes here
}
private:
MyPrivateInitStuff(QObject *parent)
: QObject(parent)
{
// initialization goes here
}
MyPrivateInitStuff *p;
};
By selecting the right parent object, this can often be made to clean up the module's data at the right moment.
|
static |
Returns the arcsine of v as an angle in radians. Arcsine is the inverse operation of sine.
See also qSin(), qAtan(), and qAcos().
|
static |
Returns the arctangent of v as an angle in radians. Arctangent is the inverse operation of tangent.
See also qTan(), qAcos(), and qAsin().
|
static |
Returns the arctangent of a point specified by the coordinates x and y. This function will return the angle and its direction.
See also qAtan().
|
static |
|
static |
|
static |
Return the ceiling of the value v.
The ceiling is the smallest integer that is not less than v. For example, if v is 41.2, then the ceiling is 42.
See also qFloor().
|
static |
Returns the CRC-16 checksum of the first len bytes of data.
The checksum is independent of the byte order (endianness).
Note: This function is a 16-bit cache conserving (16 entry table) implementation of the CRC-16-CCITT algorithm.
|
static |
Compresses the data byte array and returns the compressed data in a new byte array.
The compressionLevel parameter specifies how much compression should be used. Valid values are between 0 and 9, with 9 corresponding to the greatest compression (i.e. smaller compressed data) at the cost of using a slower algorithm. Smaller values (8, 7, ..., 1) provide successively less compression at slightly faster speeds. The value 0 corresponds to no compression at all. The default value is -1, which specifies zlib's default compression.
See also qUncompress().
|
static |
This is an overloaded function.
Compresses the first nbytes of data and returns the compressed data in a new byte array.
|
static |
Returns the cosine of an angle v in radians.
See also qSin() and qTan().
|
static |
Returns the exponential function of e to the power of v.
See also qLn().
|
static |
|
static |
|
static |
|
static |
|
static |
Return the floor of the value v.
The floor is the largest integer that is not greater than v. For example, if v is 41.2, then the floor is 41.
See also qCeil().
|
static |
Compares the floating point value p1 and p2 and returns true if they are considered equal, otherwise false.
Note that comparing values where either p1 or p2 is 0.0 will not work. The solution to this is to compare against values greater than or equal to 1.0.
// Instead of comparing with 0.0
qFuzzyCompare(0.0,1.0e-200); // This will return false
// Compare adding 1 to both values will fix the problem
qFuzzyCompare(1 + 0.0, 1 + 1.0e-200); // This will return true
The two numbers are compared in a relative way, where the exactness is stronger the smaller the numbers are.
Note: This function is thread-safe.
This function was introduced in Qt 4.4.
|
static |
Compares the floating point value p1 and p2 and returns true if they are considered equal, otherwise false.
The two numbers are compared in a relative way, where the exactness is stronger the smaller the numbers are.
Note: This function is thread-safe.
This function was introduced in Qt 4.4.
|
static |
|
static |
|
static |
Returns the value of the environment variable with name varName. To get the variable string, use QByteArray::constData().
Note: qgetenv() was introduced because getenv() from the standard C library was deprecated in VC2005 (and later versions). qgetenv() uses the new replacement function in VC, and calls the standard C library's implementation on all other platforms.
See also qputenv().
|
static |
Returns the hash value for the key.
|
static |
Returns the hash value for the key.
|
static |
|
static |
Computes a hash key from the normalized version of url.
This function was introduced in Qt 4.7.
|
static |
|
static |
Returns the hash value for the key.
|
static |
|
static |
Returns the hash value for the key.
|
static |
Returns the hash value for the key.
|
static |
Returns the hash value for the key.
|
static |
Returns the hash value for the key.
|
static |
Returns the hash value for the key.
|
static |
Returns the hash value for the key.
|
static |
Returns the hash value for the key.
|
static |
Returns the hash value for the key.
|
static |
Returns the hash value for the key.
|
static |
Returns the hash value for the key.
|
static |
Returns the hash value for the key.
|
static |
Installs a Qt message handler which has been defined previously. Returns a pointer to the previous message handler (which may be 0).
The message handler is a function that prints out debug messages, warnings, critical and fatal error messages. The Qt library (debug mode) contains hundreds of warning messages that are printed when internal errors (usually invalid function arguments) occur. Qt built in release mode also contains such warnings unless QT_NO_WARNING_OUTPUT and/or QT_NO_DEBUG_OUTPUT have been set during compilation. If you implement your own message handler, you get total control of these messages.
The default message handler prints the message to the standard output under X11 or to the debugger under Windows. If it is a fatal message, the application aborts immediately.
Only one message handler can be defined, since this is usually done on an application-wide basis to control debug output.
To restore the message handler, call qInstallMsgHandler(0).
Example:
#include <qapplication.h>
#include <stdio.h>
#include <stdlib.h>
void myMessageOutput(QtMsgType type, const char *msg)
{
switch (type) {
case QtDebugMsg:
fprintf(stderr, "Debug: s\n", msg);
break;
case QtWarningMsg:
fprintf(stderr, "Warning: s\n", msg);
break;
case QtCriticalMsg:
fprintf(stderr, "Critical: s\n", msg);
break;
case QtFatalMsg:
fprintf(stderr, "Fatal: s\n", msg);
abort();
}
}
int main(int argc, char **argv)
{
qInstallMsgHandler(myMessageOutput);
QApplication app(argc, argv);
...
return app.exec();
}
See also qDebug(), qWarning(), qCritical(), qFatal(), QtMsgType, and Debugging Techniques.
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
Returns the natural logarithm of v. Natural logarithm uses base e.
See also qExp().
|
static |
Returns the value of x raised to the power of y. That is, x is the base and y is the exponent.
See also qSqrt().
|
static |
This function sets the value of the environment variable named varName. It will create the variable if it does not exist. It returns 0 if the variable could not be set.
Note: qputenv() was introduced because putenv() from the standard C library was deprecated in VC2005 (and later versions). qputenv() uses the replacement function in VC, and calls the standard C library's implementation on all other platforms.
See also qgetenv().
|
static |
Registers the given function with the plugin loader.
This function was introduced in Qt 4.4.
|
static |
|
static |
Rounds value to the nearest integer.
Example:
qreal valueA = 2.3;
qreal valueB = 2.7;
int roundedValueA = qRound(valueA);
// roundedValueA = 2
int roundedValueB = qRound(valueB);
// roundedValueB = 3
|
static |
Rounds value to the nearest 64-bit integer.
Example:
qreal valueA = 42949672960.3;
qreal valueB = 42949672960.7;
int roundedValueA = qRound(valueA);
// roundedValueA = 42949672960
int roundedValueB = qRound(valueB);
// roundedValueB = 42949672961
|
static |
Returns the sine of the angle v in radians.
See also qCos() and qTan().
|
static |
Returns the square root of v. This function returns a NaN if v is a negative number.
See also qPow().
|
static |
Thread-safe version of the standard C++ srand() function.
Sets the argument seed to be used to generate a new random number sequence of pseudo random integers to be returned by qrand().
The sequence of random numbers generated is deterministic per thread. For example, if two threads call qsrand(1) and subsequently calls qrand(), the threads will get the same random number sequence.
This function was introduced in Qt 4.2.
See also qrand().
|
static |
|
static |
|
static |
|
static |
A safe strcmp() function.
Compares str1 and str2. Returns a negative value if str1 is less than str2, 0 if str1 is equal to str2 or a positive value if str1 is greater than str2.
Special case 1: Returns 0 if str1 and str2 are both 0.
Special case 2: Returns an arbitrary non-zero value if str1 is 0 or str2 is 0 (but not both).
See also qstrncmp(), qstricmp(), qstrnicmp(), and 8-bit Character Comparisons.
|
static |
Copies all the characters up to and including the '\0' from src into dst and returns a pointer to dst. If src is 0, it immediately returns 0.
This function assumes that dst is large enough to hold the contents of src.
See also qstrncpy().
|
static |
Returns a duplicate string.
Allocates space for a copy of src, copies it, and returns a pointer to the copy. If src is 0, it immediately returns 0.
Ownership is passed to the caller, so the returned string must be deleted using delete[].
|
static |
A safe stricmp() function.
Compares str1 and str2 ignoring the case of the characters. The encoding of the strings is assumed to be Latin-1.
Returns a negative value if str1 is less than str2, 0 if str1 is equal to str2 or a positive value if str1 is greater than str2.
Special case 1: Returns 0 if str1 and str2 are both 0.
Special case 2: Returns a random non-zero value if str1 is 0 or str2 is 0 (but not both).
See also qstrcmp(), qstrncmp(), qstrnicmp(), and 8-bit Character Comparisons.
|
static |
|
static |
A safe strlen() function.
Returns the number of characters that precede the terminating '\0', or 0 if str is 0.
See also qstrnlen().
|
static |
A safe strncmp() function.
Compares at most len bytes of str1 and str2.
Returns a negative value if str1 is less than str2, 0 if str1 is equal to str2 or a positive value if str1 is greater than str2.
Special case 1: Returns 0 if str1 and str2 are both 0.
Special case 2: Returns a random non-zero value if str1 is 0 or str2 is 0 (but not both).
See also qstrcmp(), qstricmp(), qstrnicmp(), and 8-bit Character Comparisons.
|
static |
A safe strncpy() function.
Copies at most len bytes from src (stopping at len or the terminating '\0' whichever comes first) into dst and returns a pointer to dst. Guarantees that dst is '\0'-terminated. If src or dst is 0, returns 0 immediately.
This function assumes that dst is at least len characters long.
Note: When compiling with Visual C++ compiler version 14.00 (Visual C++ 2005) or later, internally the function strncpy_s will be used.
See also qstrcpy().
|
static |
A safe strnicmp() function.
Compares at most len bytes of str1 and str2 ignoring the case of the characters. The encoding of the strings is assumed to be Latin-1.
Returns a negative value if str1 is less than str2, 0 if str1 is equal to str2 or a positive value if str1 is greater than str2.
Special case 1: Returns 0 if str1 and str2 are both 0.
Special case 2: Returns a random non-zero value if str1 is 0 or str2 is 0 (but not both).
See also qstrcmp(), qstrncmp(), qstricmp(), and 8-bit Character Comparisons.
|
static |
A safe strnlen() function.
Returns the number of characters that precede the terminating '\0', but at most maxlen. If str is 0, returns 0.
This function was introduced in Qt 4.2.
See also qstrlen().
|
static |
Returns the tangent of an angle v in radians.
See also qSin() and qCos().
|
static |
Uncompresses the data byte array and returns a new byte array with the uncompressed data.
Returns an empty QByteArray if the input data was corrupt.
This function will uncompress data compressed with qCompress() from this and any earlier Qt version, back to Qt 3.1 when this feature was added.
Note: If you want to use this function to uncompress external data that was compressed using zlib, you first need to prepend a four byte header to the byte array containing the data. The header must contain the expected length (in bytes) of the uncompressed data, expressed as an unsigned, big-endian, 32-bit integer.
See also qCompress().
|
static |
This is an overloaded function.
Uncompresses the first nbytes of data and returns a new byte array with the uncompressed data.
|
static |
Reads a char from the stream in into char chr.
See also Serializing Qt Data Types.
|
static |
|
static |
Reads a rectangle from the given stream into the given rectangle, and returns a reference to the stream.
See also Serializing Qt Data Types.
|
static |
|
static |
Reads a date from stream in into the date.
See also Serializing Qt Data Types.
|
static |
Reads a url into url from the stream in and returns a reference to the stream.
See also Format of the QDataStream operators.
|
static |
Reads a UUID from the stream s into id.
|
static |
|
static |
Reads a line from the given stream into the given line and returns a reference to the stream.
See also Serializing Qt Data Types.
|
static |
Reads a rectangle from the stream, and returns a reference to the stream.
See also Serializing Qt Data Types.
|
static |
Reads a point from the given stream into the given point and returns a reference to the stream.
See also Serializing Qt Data Types.
|
static |
Reads a line from the given stream into the given line and returns a reference to the stream.
See also Serializing Qt Data Types.
|
static |
Reads a bit array into ba from stream in.
See also Format of the QDataStream operators.
|
static |
Reads a size from the given stream into the given size, and returns a reference to the stream.
See also Serializing Qt Data Types.
|
static |
Reads a datetime from the stream in into dateTime.
See also Serializing Qt Data Types.
|
static |
Reads a time from stream in into the given time.
See also Serializing Qt Data Types.
|
static |
Reads a point from the given stream into the given point and returns a reference to the stream.
See also Serializing Qt Data Types.
|
static |
Reads a regular expression from stream in into regExp.
See also Serializing Qt Data Types.
|
static |
|
static |
Reads a byte array into ba from the stream in and returns a reference to the stream.
See also Serializing Qt Data Types.
|
static |
Reads a size from the given stream into the given size and returns a reference to the stream.
See also Serializing Qt Data Types.
|
static |
|
static |
|
static |
Reads a string list from the given in stream into the specified list.
See also Serializing Qt Data Types.
|
static |
|
static |
Writes the given size to the given stream and returns a reference to the stream.
See also Serializing Qt Data Types.
|
static |
Writes the given point to the given stream and returns a reference to the stream.
See also Serializing Qt Data Types.
|
static |
|
static |
Writes the given line to the given stream and returns a reference to the stream.
See also Serializing Qt Data Types.
|
static |
Writes the given point to the given stream and returns a reference to the stream.
See also Serializing Qt Data Types.
|
static |
Writes the char chr to the stream out.
See also Serializing Qt Data Types.
|
static |
Writes byte array ba to the stream out and returns a reference to the stream.
See also Serializing Qt Data Types.
|
static |
Writes the given easing curve to the given stream and returns a reference to the stream.
See also Serializing Qt Data Types.
|
static |
Writes the rectangle to the stream, and returns a reference to the stream.
See also Serializing Qt Data Types.
|
static |
Writes dateTime to the out stream.
See also Serializing Qt Data Types.
|
static |
Writes url url to the stream out and returns a reference to the stream.
See also Format of the QDataStream operators.
|
static |
Writes time to stream out.
See also Serializing Qt Data Types.
|
static |
|
static |
Writes bit array ba to stream out.
See also Format of the QDataStream operators.
|
static |
Writes the UUID id to the data stream s.
|
static |
Writes the given line to the given stream and returns a reference to the stream.
See also Serializing Qt Data Types.
|
static |
Writes the date to stream out.
See also Serializing Qt Data Types.
|
static |
Writes the regular expression regExp to stream out.
See also Serializing Qt Data Types.
|
static |
Writes the given rectangle to the given stream, and returns a reference to the stream.
See also Serializing Qt Data Types.
|
static |
Writes the given size to the given stream, and returns a reference to the stream.
See also Serializing Qt Data Types.
|
static |
|
static |
|
static |
Writes the given string list to the specified out stream.
See also Serializing Qt Data Types.
|
static |
|
staticget |
|
staticget |
|
staticget |
|
staticget |
Thread-safe version of the standard C++ rand() function.
Returns a value between 0 and RAND_MAX (defined in <cstdlib> and <stdlib.h>), the next number in the current sequence of pseudo-random integers.
Use qsrand() to initialize the pseudo-random number generator with a seed value.
This function was introduced in Qt 4.2.
See also qsrand().
|
staticget |
|
staticget |
|
staticget |
Returns the version number of Qt at run-time as a string (for example, "4.1.2"). This may be a different version than the version the application was compiled against.
See also QT_VERSION_STR.