The PySide.QtDeclarative.QDeclarativeItem class provides the most basic of all visual items in QML.
All visual items in Qt Declarative inherit from PySide.QtDeclarative.QDeclarativeItem . Although PySide.QtDeclarative.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 PySide.QtDeclarative.QDeclarativeItem to provide your own custom visual item that inherits these features. Note that, because it does not draw anything, PySide.QtDeclarative.QDeclarativeItem sets the QGraphicsItem.ItemHasNoContents flag. If you subclass PySide.QtDeclarative.QDeclarativeItem to create a visual item, you will need to unset this flag.
Parameters: | parent – PySide.QtDeclarative.QDeclarativeItem |
---|
Constructs a PySide.QtDeclarative.QDeclarativeItem with the given parent .
Controls the point about which simple transforms like scale apply.
Constant | Description |
---|---|
QDeclarativeItem.TopLeft | The top-left corner of the item. |
QDeclarativeItem.Top | The center point of the top of the item. |
QDeclarativeItem.TopRight | The top-right corner of the item. |
QDeclarativeItem.Left | The left most point of the vertical middle. |
QDeclarativeItem.Center | The center of the item. |
QDeclarativeItem.Right | The right most point of the vertical middle. |
QDeclarativeItem.BottomLeft | The bottom-left corner of the item. |
QDeclarativeItem.Bottom | The center point of the bottom of the item. |
QDeclarativeItem.BottomRight | The bottom-right corner of the item. |
Parameters: | arg__1 – PySide.QtCore.bool |
---|
Return type: | PySide.QtCore.qreal |
---|
Parameters: | arg__1 – PySide.QtCore.qreal |
---|
Parameters: |
|
---|---|
Return type: |
Return type: | PySide.QtCore.QRectF |
---|
Parameters: | arg__1 – PySide.QtCore.QRectF |
---|
Return type: | PySide.QtCore.bool |
---|
Parameters: | arg__1 – PySide.QtCore.bool |
---|
Parameters: | arg__1 – PySide.QtCore.bool |
---|
Parameters: |
|
---|
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.
Return type: | PySide.QtCore.bool |
---|
Return type: | PySide.QtCore.qreal |
---|
Return the height of the item
Return type: | PySide.QtCore.bool |
---|
Returns whether the height property has been set explicitly.
Return type: | PySide.QtCore.qreal |
---|
Returns the height of the item that is implied by other properties that determine the content.
Return type: | PySide.QtCore.qreal |
---|
Returns the width of the item that is implied by other properties that determine the content.
Parameters: | arg__1 – PySide.QtGui.QInputMethodEvent |
---|
Return type: | PySide.QtCore.bool |
---|
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
PySide.QtDeclarative.QDeclarativeItem.componentComplete()
Return type: | PySide.QtCore.bool |
---|
Returns a value indicating whether mouse input should remain with this item exclusively.
Parameters: | arg__1 – PySide.QtGui.QKeyEvent |
---|
Parameters: | arg__1 – PySide.QtGui.QKeyEvent |
---|
Parameters: |
|
---|---|
Return type: |
Parameters: |
|
---|---|
Return type: |
Parameters: | arg__1 – PySide.QtDeclarative.QDeclarativeItem |
---|
Reset the height of the item
Reset the width of the item
Parameters: | arg__1 – PySide.QtCore.qreal |
---|
Parameters: | arg__1 – PySide.QtCore.bool |
---|
Parameters: | arg__1 – PySide.QtCore.bool |
---|
Parameters: | arg__1 – PySide.QtCore.qreal |
---|
Set the height of the item
Parameters: | arg__1 – PySide.QtCore.qreal |
---|
Sets the implied height of the item to h . This is the height implied by other properties that determine the content.
Parameters: | arg__1 – PySide.QtCore.qreal |
---|
Sets the implied width of the item to w . This is the width implied by other properties that determine the content.
Parameters: | arg__1 – PySide.QtCore.bool |
---|
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.
Parameters: | parent – PySide.QtDeclarative.QDeclarativeItem |
---|
See also
PySide.QtDeclarative.QDeclarativeItem.parentItem()
Parameters: | size – PySide.QtCore.QSizeF |
---|
Parameters: | arg__1 – PySide.QtCore.bool |
---|
Sets whether the item should be drawn with antialiasing and smooth pixmap filtering to smooth .
Parameters: | arg__1 – PySide.QtDeclarative.QDeclarativeItem.TransformOrigin |
---|
Set the transform origin .
Parameters: | arg__1 – PySide.QtCore.qreal |
---|
Set the width of the item
Return type: | PySide.QtCore.bool |
---|
Returns true if the item should be drawn with antialiasing and smooth pixmap filtering, false otherwise.
The default is false.
Parameters: | arg__1 – PySide.QtCore.bool |
---|
Parameters: | arg__1 – unicode |
---|
Return type: | PySide.QtDeclarative.QDeclarativeItem.TransformOrigin |
---|
Returns the current transform origin.
Parameters: | arg__1 – PySide.QtDeclarative.QDeclarativeItem.TransformOrigin |
---|
Return type: | PySide.QtCore.qreal |
---|
Return the width of the item
Return type: | PySide.QtCore.bool |
---|
Returns whether the width property has been set explicitly.