PythonQt.QtGui.QGestureRecognizer · declarations 001
Back to PythonQt.QtGui.QGestureRecognizer
CancelGesture
instance-attribute
CancelGesture: Any
ConsumeEventHint
instance-attribute
ConsumeEventHint: Any
FinishGesture
instance-attribute
FinishGesture: Any
MayBeGesture
instance-attribute
MayBeGesture: Any
Result
instance-attribute
Result: type
int([x]) -> integer int(x, base=10) -> integer
Convert a number or string to an integer, or return 0 if no arguments are given. If x is a number, return x.int(). For floating point numbers, this truncates towards zero.
If x is not a number or if base is given, then x must be a string, bytes, or bytearray instance representing an integer literal in the given base. The literal can be preceded by '+' or '-' and be surrounded by whitespace. The base defaults to 10. Valid bases are 0 and 2-36. Base 0 means to interpret the base from the string as an integer literal.
int('0b100', base=0) 4
ResultFlag
instance-attribute
ResultFlag: type
int([x]) -> integer int(x, base=10) -> integer
Convert a number or string to an integer, or return 0 if no arguments are given. If x is a number, return x.int(). For floating point numbers, this truncates towards zero.
If x is not a number or if base is given, then x must be a string, bytes, or bytearray instance representing an integer literal in the given base. The literal can be preceded by '+' or '-' and be surrounded by whitespace. The base defaults to 10. Valid bases are 0 and 2-36. Base 0 means to interpret the base from the string as an integer literal.
int('0b100', base=0) 4
ResultHint_Mask
instance-attribute
ResultHint_Mask: Any
ResultState_Mask
instance-attribute
ResultState_Mask: Any
TriggerGesture
instance-attribute
TriggerGesture: Any
create
create(target: Any) -> Any
X.create(target) -> PythonQt.QtGui.QGesture
Supplemental documentation: Qt 5 reference:
[virtual] QGesture *QGestureRecognizer::create(QObject *target)
This function is called by Qt to create a new QGesture object for the given target (QWidget or QGraphicsObject).
Reimplement this function to create a custom QGesture-derived gesture object if necessary.
The application takes ownership of the created gesture object.
Upstream PySide2 reference signatures (binding differences may apply):
create(self, target: PySide2.QtCore.QObject) -> PySide2.QtWidgets.QGesture
Source: https://doc.qt.io/archives/qt-5.15/qgesturerecognizer.html#create
recognize
recognize(state: Any, watched: Any, event: Any) -> Any
X.recognize(state, watched, event)
Supplemental documentation: Qt 5 reference:
[pure virtual] QGestureRecognizer::Result QGestureRecognizer::recognize(QGesture *gesture, QObject *watched, QEvent *event)
Handles the given event for the watched object, updating the state of the gesture object as required, and returns a suitable result for the current recognition step.
This function is called by the framework to allow the recognizer to filter input events dispatched to QWidget or QGraphicsObject instances that it is monitoring.
The result reflects how much of the gesture has been recognized. The state of the gesture object is set depending on the result.
See also QGestureRecognizer::Result.
Upstream PySide2 reference signatures (binding differences may apply):
recognize(self, state: PySide2.QtWidgets.QGesture, watched: PySide2.QtCore.QObject, event: PySide2.QtCore.QEvent) -> PySide2.QtWidgets.QGestureRecognizer.Result
Source: https://doc.qt.io/archives/qt-5.15/qgesturerecognizer.html#recognize
registerRecognizer
registerRecognizer(recognizer: Any) -> Any
X.registerRecognizer(recognizer)
Supplemental documentation: Qt 5 reference:
[static] Qt::GestureType QGestureRecognizer::registerRecognizer(QGestureRecognizer *recognizer)
Registers the given recognizer in the gesture framework and returns a gesture ID for it.
The application takes ownership of the recognizer and returns the gesture type ID associated with it. For gesture recognizers which handle custom QGesture objects (i.e., those which return Qt::CustomGesture in a QGesture::gestureType() function) the return value is a generated gesture ID with the Qt::CustomGesture flag set.
See also unregisterRecognizer(), QGestureRecognizer::create(), and QGesture.
Upstream PySide2 reference signatures (binding differences may apply):
registerRecognizer(recognizer: PySide2.QtWidgets.QGestureRecognizer) -> PySide2.QtCore.Qt.GestureType
Source: https://doc.qt.io/archives/qt-5.15/qgesturerecognizer.html#registerRecognizer
reset
reset(state: Any) -> None
X.reset(state)
Supplemental documentation: Qt 5 reference:
[virtual] void QGestureRecognizer::reset(QGesture *gesture)
This function is called by the framework to reset a given gesture.
Reimplement this function to implement additional requirements for custom QGesture objects. This may be necessary if you implement a custom QGesture whose properties need special handling when the gesture is reset.
Upstream PySide2 reference signatures (binding differences may apply):
reset(self, state: PySide2.QtWidgets.QGesture) -> None
Source: https://doc.qt.io/archives/qt-5.15/qgesturerecognizer.html#reset
unregisterRecognizer
unregisterRecognizer(type: Any) -> None
X.unregisterRecognizer(type)
Supplemental documentation: Qt 5 reference:
[static] void QGestureRecognizer::unregisterRecognizer(Qt::GestureType type)
Unregisters all gesture recognizers of the specified type.
See also registerRecognizer().
Upstream PySide2 reference signatures (binding differences may apply):
unregisterRecognizer(type: PySide2.QtCore.Qt.GestureType) -> None
Source: https://doc.qt.io/archives/qt-5.15/qgesturerecognizer.html#unregisterRecognizer