QDeclarativeItem

概要

虚函数

详细描述

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.

class PySide.QtDeclarative. QDeclarativeItem ( [ parent=None ] )
参数: parent PySide.QtDeclarative.QDeclarativeItem

构造 PySide.QtDeclarative.QDeclarativeItem with the given parent .

PySide.QtDeclarative.QDeclarativeItem. TransformOrigin

Controls the point about which simple transforms like scale apply.

常量 描述
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.
PySide.QtDeclarative.QDeclarativeItem. activeFocusChanged ( arg__1 )
参数: arg__1 PySide.QtCore.bool
PySide.QtDeclarative.QDeclarativeItem. baselineOffset ( )
返回类型: PySide.QtCore.qreal
PySide.QtDeclarative.QDeclarativeItem. baselineOffsetChanged ( arg__1 )
参数: arg__1 PySide.QtCore.qreal
PySide.QtDeclarative.QDeclarativeItem. childAt ( x , y )
参数:
  • x PySide.QtCore.qreal
  • y PySide.QtCore.qreal
返回类型:

PySide.QtDeclarative.QDeclarativeItem

PySide.QtDeclarative.QDeclarativeItem. childrenRect ( )
返回类型: PySide.QtCore.QRectF
PySide.QtDeclarative.QDeclarativeItem. childrenRectChanged ( arg__1 )
参数: arg__1 PySide.QtCore.QRectF
PySide.QtDeclarative.QDeclarativeItem. clip ( )
返回类型: PySide.QtCore.bool
PySide.QtDeclarative.QDeclarativeItem. clipChanged ( arg__1 )
参数: arg__1 PySide.QtCore.bool
PySide.QtDeclarative.QDeclarativeItem. focusChanged ( arg__1 )
参数: arg__1 PySide.QtCore.bool
PySide.QtDeclarative.QDeclarativeItem. forceActiveFocus ( )
PySide.QtDeclarative.QDeclarativeItem. geometryChanged ( newGeometry , oldGeometry )
参数:

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.

PySide.QtDeclarative.QDeclarativeItem. hasActiveFocus ( )
返回类型: PySide.QtCore.bool
PySide.QtDeclarative.QDeclarativeItem. height ( )
返回类型: PySide.QtCore.qreal

Return the height of the item

PySide.QtDeclarative.QDeclarativeItem. heightValid ( )
返回类型: PySide.QtCore.bool

Returns whether the height property has been set explicitly.

PySide.QtDeclarative.QDeclarativeItem. implicitHeight ( )
返回类型: PySide.QtCore.qreal

Returns the height of the item that is implied by other properties that determine the content.

PySide.QtDeclarative.QDeclarativeItem. implicitHeightChanged ( )
PySide.QtDeclarative.QDeclarativeItem. implicitWidth ( )
返回类型: PySide.QtCore.qreal

Returns the width of the item that is implied by other properties that determine the content.

PySide.QtDeclarative.QDeclarativeItem. implicitWidthChanged ( )
PySide.QtDeclarative.QDeclarativeItem. inputMethodPreHandler ( arg__1 )
参数: arg__1 PySide.QtGui.QInputMethodEvent
PySide.QtDeclarative.QDeclarativeItem. isComponentComplete ( )
返回类型: 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.

另请参阅

PySide.QtDeclarative.QDeclarativeItem.componentComplete()

PySide.QtDeclarative.QDeclarativeItem. keepMouseGrab ( )
返回类型: PySide.QtCore.bool

Returns a value indicating whether mouse input should remain with this item exclusively.

PySide.QtDeclarative.QDeclarativeItem. keyPressPreHandler ( arg__1 )
参数: arg__1 PySide.QtGui.QKeyEvent
PySide.QtDeclarative.QDeclarativeItem. keyReleasePreHandler ( arg__1 )
参数: arg__1 PySide.QtGui.QKeyEvent
PySide.QtDeclarative.QDeclarativeItem. mapFromItem ( item , x , y )
参数:
返回类型:

PySide.QtScript.QScriptValue

PySide.QtDeclarative.QDeclarativeItem. mapToItem ( item , x , y )
参数:
返回类型:

PySide.QtScript.QScriptValue

PySide.QtDeclarative.QDeclarativeItem. parentChanged ( arg__1 )
参数: arg__1 PySide.QtDeclarative.QDeclarativeItem
PySide.QtDeclarative.QDeclarativeItem. resetHeight ( )

Reset the height of the item

PySide.QtDeclarative.QDeclarativeItem. resetWidth ( )

Reset the width of the item

PySide.QtDeclarative.QDeclarativeItem. setBaselineOffset ( arg__1 )
参数: arg__1 PySide.QtCore.qreal
PySide.QtDeclarative.QDeclarativeItem. setClip ( arg__1 )
参数: arg__1 PySide.QtCore.bool
PySide.QtDeclarative.QDeclarativeItem. setFocus ( arg__1 )
参数: arg__1 PySide.QtCore.bool
PySide.QtDeclarative.QDeclarativeItem. setHeight ( arg__1 )
参数: arg__1 PySide.QtCore.qreal

Set the height of the item

PySide.QtDeclarative.QDeclarativeItem. setImplicitHeight ( arg__1 )
参数: 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.

PySide.QtDeclarative.QDeclarativeItem. setImplicitWidth ( arg__1 )
参数: 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.

PySide.QtDeclarative.QDeclarativeItem. setKeepMouseGrab ( arg__1 )
参数: 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.

PySide.QtDeclarative.QDeclarativeItem. setParentItem ( parent )
参数: parent PySide.QtDeclarative.QDeclarativeItem

另请参阅

PySide.QtDeclarative.QDeclarativeItem.parentItem()

PySide.QtDeclarative.QDeclarativeItem. setSize ( size )
参数: size PySide.QtCore.QSizeF
PySide.QtDeclarative.QDeclarativeItem. setSmooth ( arg__1 )
参数: arg__1 PySide.QtCore.bool

Sets whether the item should be drawn with antialiasing and smooth pixmap filtering to smooth .

PySide.QtDeclarative.QDeclarativeItem. setTransformOrigin ( arg__1 )
参数: arg__1 PySide.QtDeclarative.QDeclarativeItem.TransformOrigin

Set the transform origin .

PySide.QtDeclarative.QDeclarativeItem. setWidth ( arg__1 )
参数: arg__1 PySide.QtCore.qreal

Set the width of the item

PySide.QtDeclarative.QDeclarativeItem. smooth ( )
返回类型: PySide.QtCore.bool

Returns true if the item should be drawn with antialiasing and smooth pixmap filtering, false otherwise.

默认为 false。

PySide.QtDeclarative.QDeclarativeItem. smoothChanged ( arg__1 )
参数: arg__1 PySide.QtCore.bool
PySide.QtDeclarative.QDeclarativeItem. stateChanged ( arg__1 )
参数: arg__1 – unicode
PySide.QtDeclarative.QDeclarativeItem. transformOrigin ( )
返回类型: PySide.QtDeclarative.QDeclarativeItem.TransformOrigin

Returns the current transform origin.

PySide.QtDeclarative.QDeclarativeItem. transformOriginChanged ( arg__1 )
参数: arg__1 PySide.QtDeclarative.QDeclarativeItem.TransformOrigin
PySide.QtDeclarative.QDeclarativeItem. width ( )
返回类型: PySide.QtCore.qreal

Return the width of the item

PySide.QtDeclarative.QDeclarativeItem. widthValid ( )
返回类型: PySide.QtCore.bool

Returns whether the width property has been set explicitly.