QScrollerPropertiesclass stores the settings for aQScroller. 更多 …
def
__eq__
(sp)
def
__ne__
(sp)
def
scrollMetric
(metric)
def
setScrollMetric
(metric, value)
def
setDefaultScrollerProperties
(sp)
QScrollerPropertiesclass stores the parameters used byQScroller.The default settings are platform dependent so that Qt emulates the platform behaviour for kinetic scrolling.
As a convention the
QScrollerPropertiesare in physical units (meter, seconds) and are converted byQScrollerusing the current DPI.另请参阅
QScroller
QScrollerProperties
¶
QScrollerProperties(sp)
- param sp
构造新滚动条特性。
PySide2.QtWidgets.QScrollerProperties.
OvershootPolicy
¶
This enum describes the various modes of overshooting.
|
常量 |
描述 |
|---|---|
|
QScrollerProperties.OvershootWhenScrollable |
Overshooting is possible when the content is scrollable. This is the default. |
|
QScrollerProperties.OvershootAlwaysOff |
Overshooting is never enabled, even when the content is scrollable. |
|
QScrollerProperties.OvershootAlwaysOn |
Overshooting is always enabled, even when the content is not scrollable. |
PySide2.QtWidgets.QScrollerProperties.
FrameRates
¶
This enum describes the available frame rates used while dragging or scrolling.
|
常量 |
描述 |
|---|---|
|
QScrollerProperties.Fps60 |
60 frames per second |
|
QScrollerProperties.Fps30 |
30 frames per second |
|
QScrollerProperties.Fps20 |
20 frames per second |
|
QScrollerProperties.Standard |
the default value is 60 frames per second (which corresponds to
|
PySide2.QtWidgets.QScrollerProperties.
ScrollMetric
¶
This enum contains the different scroll metric types. When not indicated otherwise the
setScrollMetric
function expects a
QVariant
of type qreal.
见
QScroller
documentation for further details of the concepts behind the different values.
|
常量 |
描述 |
|---|---|
|
QScrollerProperties.MousePressEventDelay |
This is the time a mouse press event is delayed when starting a flick gesture in
|
|
QScrollerProperties.DragStartDistance |
This is the minimum distance the touch or mouse point needs to be moved before the flick gesture is triggered in
|
|
QScrollerProperties.DragVelocitySmoothingFactor |
A value that describes to which extent new drag velocities are included in the final scrolling velocity. This value should be in the range between
|
|
QScrollerProperties.AxisLockThreshold |
Restricts the movement to one axis if the movement is inside an angle around the axis. The threshold must be in the range
|
|
QScrollerProperties.ScrollingCurve |
|
|
QScrollerProperties.DecelerationFactor |
This factor influences how long it takes the scroller to decelerate to 0 velocity. The actual value depends on the chosen . For most types the value should be in the range from
|
|
QScrollerProperties.MinimumVelocity |
The minimum velocity that is needed after ending the touch or releasing the mouse to start scrolling in
|
|
QScrollerProperties.MaximumVelocity |
This is the maximum velocity that can be reached in
|
|
QScrollerProperties.MaximumClickThroughVelocity |
This is the maximum allowed scroll speed for a click-through in
|
|
QScrollerProperties.AcceleratingFlickMaximumTime |
This is the maximum time in
|
|
QScrollerProperties.AcceleratingFlickSpeedupFactor |
The current speed is multiplied by this number if an accelerating flick is detected. Should be
|
|
QScrollerProperties.SnapPositionRatio |
This is the distance that the user must drag the area beween two snap points in order to snap it to the next position.
|
|
QScrollerProperties.SnapTime |
This is the time factor for the scrolling curve. A lower value means that the scrolling will take longer. The scrolling distance is independet of this value. |
|
QScrollerProperties.OvershootDragResistanceFactor |
This value is the factor between the mouse dragging and the actual scroll area movement (during overshoot). The factor must be between
|
|
QScrollerProperties.OvershootDragDistanceFactor |
This is the maximum distance for overshoot movements while dragging. The actual overshoot distance is calculated by multiplying this value with the viewport size of the scrolled object. The factor must be between
|
|
QScrollerProperties.OvershootScrollDistanceFactor |
This is the maximum distance for overshoot movements while scrolling. The actual overshoot distance is calculated by multiplying this value with the viewport size of the scrolled object. The factor must be between
|
|
QScrollerProperties.OvershootScrollTime |
This is the time in
|
|
QScrollerProperties.HorizontalOvershootPolicy |
This is the horizontal overshooting policy (see
|
|
QScrollerProperties.VerticalOvershootPolicy |
This is the horizontal overshooting policy (see
|
|
QScrollerProperties.FrameRate |
This is the frame rate which should be used while dragging or scrolling.
|
|
QScrollerProperties.ScrollMetricCount |
This is always the last entry. |
PySide2.QtWidgets.QScrollerProperties.
__ne__
(
sp
)
¶
sp
–
QScrollerProperties
bool
返回
true
if these scroller properties are different from
sp
;否则返回
false
.
PySide2.QtWidgets.QScrollerProperties.
__eq__
(
sp
)
¶
sp
–
QScrollerProperties
bool
返回
true
if these scroller properties are equal to
sp
;否则返回
false
.
PySide2.QtWidgets.QScrollerProperties.
scrollMetric
(
metric
)
¶
metric
–
ScrollMetric
object
Query the
metric
value of the scroller properties.
另请参阅
setScrollMetric()
ScrollMetric
PySide2.QtWidgets.QScrollerProperties.
setDefaultScrollerProperties
(
sp
)
¶
sp
–
QScrollerProperties
Sets the scroller properties for all new
QScrollerProperties
objects to
sp
.
Use this function to override the platform default properties returned by the default constructor. If you only want to change the scroller properties of a single scroller, use
setScrollerProperties()
注意
Calling this function will not change the content of already existing
QScrollerProperties
对象。
PySide2.QtWidgets.QScrollerProperties.
setScrollMetric
(
metric
,
value
)
¶
metric
–
ScrollMetric
value – object
Set a specific value of the
metric
ScrollerMetric to
value
.
另请参阅
scrollMetric()
ScrollMetric
PySide2.QtWidgets.QScrollerProperties.
unsetDefaultScrollerProperties
(
)
¶
Sets the scroller properties returned by the default constructor back to the platform default properties.