Home · All Classes · Modules |
The QDeclarativeItem class provides the most basic of all visual items in QML. More...
Inherits QGraphicsObject and QDeclarativeParserStatus.
The QDeclarativeItem class provides the most basic of all visual items in QML.
All visual items in Qt Declarative inherit from QDeclarativeItem. Although QDeclarativeItem has no visual appearance, it defines all the properties that are common across visual items - such as the x and y position, the width and height, anchoring and key handling.
You can subclass QDeclarativeItem to provide your own custom visual item that inherits these features. Note that, because it does not draw anything, QDeclarativeItem sets the QGraphicsItem.ItemHasNoContents flag. If you subclass QDeclarativeItem to create a visual item, you will need to unset this flag.
Controls the point about which simple transforms like scale apply.
Constant | Value | Description |
---|---|---|
QDeclarativeItem.TopLeft | 0 | The top-left corner of the item. |
QDeclarativeItem.Top | 1 | The center point of the top of the item. |
QDeclarativeItem.TopRight | 2 | The top-right corner of the item. |
QDeclarativeItem.Left | 3 | The left most point of the vertical middle. |
QDeclarativeItem.Center | 4 | The center of the item. |
QDeclarativeItem.Right | 5 | The right most point of the vertical middle. |
QDeclarativeItem.BottomLeft | 6 | The bottom-left corner of the item. |
QDeclarativeItem.Bottom | 7 | The center point of the bottom of the item. |
QDeclarativeItem.BottomRight | 8 | The bottom-right corner of the item. |
The parent argument, if not None, causes self to be owned by Qt instead of PyQt.
Constructs a QDeclarativeItem with the given parent.
This function is called to handle this item's changes in geometry from oldGeometry to newGeometry. If the two geometries are the same, it doesn't do anything.
Returns whether the height property has been set explicitly.
Returns true if construction of the QML component is complete; otherwise returns false.
It is often desirable to delay some processing until the component is completed.
See also componentComplete().
Returns a value indicating whether mouse input should remain with this item exclusively.
See also setKeepMouseGrab().
Sets the implied height of the item to h. This is the height implied by other properties that determine the content.
See also implicitHeight().
Sets the implied width of the item to w. This is the width implied by other properties that determine the content.
See also implicitWidth().
The flag indicating whether the mouse should remain with this item is set to keep.
This is useful for items that wish to grab and keep mouse interaction following a predefined gesture. For example, an item that is interested in horizontal mouse movement may set keepMouseGrab to true once a threshold has been exceeded. Once keepMouseGrab has been set to true, filtering items will not react to mouse events.
If the item does not indicate that it wishes to retain mouse grab, a filtering item may steal the grab. For example, Flickable may attempt to steal a mouse grab if it detects that the user has begun to move the viewport.
See also keepMouseGrab().
The parent argument, if not None, causes self to be owned by Qt instead of PyQt.
Set the transform origin.
See also transformOrigin().
Returns the current transform origin.
See also setTransformOrigin().
Returns whether the width property has been set explicitly.
PyQt 4.10.1 for MacOS | Copyright © Riverbank Computing Ltd and Nokia 2012 | Qt 4.8.4 |