PythonQt.Qt.QScroller
QScroller
PythonQtInstanceWrapper object
Native bases: PythonQtInstanceWrapper
Supplemental documentation: Qt 5 reference:
Detailed Description
With kinetic scrolling, the user can push the widget in a given direction and it will continue to scroll in this direction until it is stopped either by the user or by friction. Aspects of inertia, friction and other physical concepts can be changed in order to fine-tune an intuitive user experience.
The QScroller object is the object that stores the current position and scrolling speed and takes care of updates. QScroller can be triggered by a flick gesture
QWidget *w = ...;
QScroller::grabGesture(w, QScroller::LeftMouseButtonGesture);
or directly like this:
QWidget *w = ...;
QScroller *scroller = QScroller::scroller(w);
scroller->scrollTo(QPointF(100, 100));
The scrolled QObjects receive a QScrollPrepareEvent whenever the scroller needs to update its geometry information and a QScrollEvent whenever the content of the object should actually be scrolled.
The scroller uses the global QAbstractAnimation timer to generate its QScrollEvents. This can be changed with QScrollerProperties::FrameRate on a per-QScroller basis.
The Dir View
Example
shows one way to use a QScroller with a
QTreeView. An example in the
scroller examples directory also demonstrates QScroller.
Even though this kinetic scroller has a large number of settings available via
QScrollerProperties, we
recommend that you leave them all at their default, platform optimized values. Before
changing them you can experiment with the plot example in the scroller examples
directory.
Source: https://doc.qt.io/archives/qt-5.15/qscroller.html
Complete member index
Every captured member retains its own identity. Identical captured declaration text is linked once; this does not establish native inheritance or interchangeable objects.
| Member | Kind | Signature | Summary |
|---|---|---|---|
Dragging |
attribute | Any |
(shared captured text) |
Inactive |
attribute | Any |
(shared captured text) |
Input |
attribute | type |
Convert a number or string to an integer, or return 0 if no arguments are given. (shared captured text) |
InputMove |
attribute | Any |
(shared captured text) |
InputPress |
attribute | Any |
(shared captured text) |
InputRelease |
attribute | Any |
(shared captured text) |
LeftMouseButtonGesture |
attribute | Any |
(shared captured text) |
MiddleMouseButtonGesture |
attribute | Any |
(shared captured text) |
Pressed |
attribute | Any |
(shared captured text) |
RightMouseButtonGesture |
attribute | Any |
(shared captured text) |
ScrollerGestureType |
attribute | type |
Convert a number or string to an integer, or return 0 if no arguments are given. (shared captured text) |
Scrolling |
attribute | Any |
(shared captured text) |
State |
attribute | type |
Convert a number or string to an integer, or return 0 if no arguments are given. (shared captured text) |
TouchGesture |
attribute | Any |
(shared captured text) |
__init__ |
function | (self, *args: Any, **kwargs: Any) -> None |
Native constructor; consult class documentation for supported overloads. (shared captured text) |
activeScrollers |
function | (self) -> tuple |
X.activeScrollers() -> tuple (shared captured text) |
blockSignals |
function | (self, b: Any) -> bool |
X.blockSignals(b) -> bool (shared captured text) |
childEvent |
function | (self, event: Any) -> Any |
(shared captured text) |
children |
function | (self) -> tuple |
X.children() -> tuple (shared captured text) |
className |
function | (self, *args: Any, **kwargs: Any) -> Any |
Return the classname of the object (shared captured text) |
connect |
function | (self, signal: Any, receiver: Any, slot: Any, type: Any) -> bool |
X.connect(signal, receiver, slot, type) -> bool (shared captured text) |
customEvent |
function | (self, event: Any) -> Any |
(shared captured text) |
delete |
function | (self, *args: Any, **kwargs: Any) -> Any |
Deletes the C++ object (at your own risk, my friend!) (shared captured text) |
deleteLater |
function | (self) -> Any |
(shared captured text) |
destroyed |
function | (self, *args: Any, **kwargs: Any) -> Any |
Native PythonQt.Qt.QScroller.destroyed; argument details are not documented. |
disconnect |
function | (self, signal: Any, receiver: Any, slot: Any) -> bool |
X.disconnect(signal, receiver, slot) -> bool (shared captured text) |
dumpObjectInfo |
function | (self) -> Any |
(shared captured text) |
dumpObjectTree |
function | (self) -> Any |
(shared captured text) |
dynamicPropertyNames |
function | (self) -> Any |
(shared captured text) |
ensureVisible |
function | (self, rect: Any, xmargin: float, ymargin: float, scrollTime: Any) -> None |
X.ensureVisible(rect, xmargin, ymargin, scrollTime) (shared captured text) |
event |
function | (self, event: Any) -> bool |
X.event(event) -> bool (shared captured text) |
eventFilter |
function | (self, watched: Any, event: Any) -> bool |
X.eventFilter(watched, event) -> bool (shared captured text) |
finalPosition |
function | (self) -> Any |
X.finalPosition() -> PythonQt.QtCore.QPointF (shared captured text) |
findChild |
function | (self, type: Any, name: Any) -> Any |
X.findChild(type, name) -> PythonQt.private.QObject (shared captured text) |
findChildren |
function | (self, type: Any, name: Any) -> tuple |
X.findChildren(type, name) -> tuple (shared captured text) |
grabGesture |
function | (self, target: Any, gestureType: Any) -> Any |
X.grabGesture(target, gestureType) (shared captured text) |
grabbedGesture |
function | (self, target: Any) -> Any |
Returns the gesture type currently grabbed for the target or 0 if no gesture is grabbed. (shared captured text) |
handleInput |
function | (self, input: Any, position: Any, timestamp: int) -> bool |
X.handleInput(input, position, timestamp) -> bool (shared captured text) |
hasScroller |
function | (self, target: Any) -> bool |
X.hasScroller(target) -> bool (shared captured text) |
help |
function | (self, *args: Any, **kwargs: Any) -> Any |
Shows the help of available methods for this class (shared captured text) |
inherits |
function | (self, *args: Any, **kwargs: Any) -> Any |
Returns if the class inherits or is of given type name (shared captured text) |
installEventFilter |
function | (self, filterObj: Any) -> Any |
(shared captured text) |
isSignalConnected |
function | (self, signal: Any) -> bool |
X.isSignalConnected(signal) -> bool (shared captured text) |
isWidgetType |
function | (self) -> bool |
X.isWidgetType() -> bool (shared captured text) |
isWindowType |
function | (self) -> bool |
X.isWindowType() -> bool (shared captured text) |
killTimer |
function | (self, id: Any) -> Any |
(shared captured text) |
metaObject |
function | (self) -> Any |
X.metaObject() -> PythonQt.QtCore.QMetaObject (shared captured text) |
moveToThread |
function | (self, thread: Any) -> Any |
(shared captured text) |
objectName |
attribute | Any |
(shared captured text) |
objectNameChanged |
function | (self, *args: Any, **kwargs: Any) -> Any |
Native PythonQt.Qt.QScroller.objectNameChanged; argument details are not documented. |
parent |
function | (self) -> Any |
X.parent() -> PythonQt.private.QObject (shared captured text) |
pixelPerMeter |
function | (self) -> Any |
X.pixelPerMeter() -> PythonQt.QtCore.QPointF (shared captured text) |
property |
function | (self, name: Any) -> Any |
X.property(name) -> object (shared captured text) |
removeEventFilter |
function | (self, obj: Any) -> Any |
(shared captured text) |
resendPrepareEvent |
function | (self) -> None |
This function resends the [QScrollPrepareEvent](https://doc.qt.io/archives/qt-5.15/qscrollprepareevent.html). (shared captured text) |
scrollTo |
function | (self, pos: Any, scrollTime: Any) -> None |
X.scrollTo(pos, scrollTime) (shared captured text) |
scroller |
function | (self, target: Any) -> Any |
X.scroller(target) -> PythonQt.QtGui.QScroller (shared captured text) |
scrollerProperties |
attribute | QScrollerProperties |
This property holds the scroller properties of this scroller. (shared captured text) |
scrollerPropertiesChanged |
function | (self, *args: Any, **kwargs: Any) -> Any |
Native PythonQt.Qt.QScroller.scrollerPropertiesChanged; argument details are not documented. |
sender |
function | (self) -> Any |
X.sender() -> PythonQt.private.QObject (shared captured text) |
senderSignalIndex |
function | (self) -> int |
X.senderSignalIndex() -> int (shared captured text) |
setObjectName |
function | (self, name: Any) -> Any |
(shared captured text) |
setParent |
function | (self, parent: Any) -> Any |
(shared captured text) |
setProperty |
function | (self, name: Any, value: Any) -> bool |
X.setProperty(name, value) -> bool (shared captured text) |
setScrollerProperties |
function | (self, prop: Any) -> None |
(shared captured text) |
setSnapPositionsX |
function | (self, first: Any, interval: Any) -> None |
X.setSnapPositionsX(first, interval) (shared captured text) |
setSnapPositionsY |
function | (self, first: Any, interval: Any) -> None |
X.setSnapPositionsY(first, interval) (shared captured text) |
signalsBlocked |
function | (self) -> bool |
X.signalsBlocked() -> bool (shared captured text) |
startTimer |
function | (self, interval: Any, timerType: Any) -> int |
X.startTimer(interval, timerType) -> int (shared captured text) |
state |
attribute | Any |
This property holds the state of the scroller (shared captured text) |
stateChanged |
function | (self, *args: Any, **kwargs: Any) -> Any |
Native PythonQt.Qt.QScroller.stateChanged; argument details are not documented. |
stop |
function | (self) -> None |
Stops the scroller and resets its state back to Inactive. (shared captured text) |
target |
function | (self) -> Any |
X.target() -> PythonQt.private.QObject (shared captured text) |
thread |
function | (self) -> Any |
(shared captured text) |
timerEvent |
function | (self, event: Any) -> Any |
(shared captured text) |
tr |
function | (self, text: Any, ambig: Any, n: Any) -> str |
X.tr(text, ambig, n) -> str (shared captured text) |
ungrabGesture |
function | (self, target: Any) -> None |
Ungrabs the gesture for the target. (shared captured text) |
velocity |
function | (self) -> Any |
X.velocity() -> PythonQt.QtCore.QPointF (shared captured text) |