QSlider Class Reference |
Signal | Description |
---|---|
valueChanged() | Emitted when the slider's value has changed. The tracking() determines whether this signal is emitted during user interaction. |
sliderPressed() | Emitted when the user starts to drag the slider. |
sliderMoved() | Emitted when the user drags the slider. |
sliderReleased() | Emitted when the user releases the slider. |
QSlider only provides integer ranges. Note that although QSlider handles very large numbers, it becomes difficult for users to use a slider accurately for very large ranges.
A slider accepts focus on Tab and provides both a mouse wheel and a keyboard interface. The keyboard interface is the following:
A slider shown in the Macintosh widget style. | |
A slider shown in the Windows XP widget style. | |
A slider shown in the Plastique widget style. |
See also QScrollBar, QSpinBox, and GUI Design Handbook: Slider.
This enum specifies where the tick marks are to be drawn relative to the slider's groove and the handle the user moves.
Constant | Value | Description |
---|---|---|
QSlider::NoTicks | 0 | Do not draw any tick marks. |
QSlider::TicksBothSides | 3 | Draw tick marks on both sides of the groove. |
QSlider::TicksAbove | 1 | Draw tick marks above the (horizontal) slider |
QSlider::TicksBelow | 2 | Draw tick marks below the (horizontal) slider |
QSlider::TicksLeft | TicksAbove | Draw tick marks to the left of the (vertical) slider |
QSlider::TicksRight | TicksBelow | Draw tick marks to the right of the (vertical) slider |
This property holds the interval between tickmarks.
This is a value interval, not a pixel interval. If it is 0, the slider will choose between lineStep() and pageStep().
The default value is 0.
Access functions:
See also tickPosition, lineStep(), and pageStep().
This property holds the tickmark position for this slider.
The valid values are described by the QSlider::TickPosition enum.
The default value is QSlider::NoTicks.
Access functions:
See also tickInterval.
Constructs a vertical slider with the given parent.
Constructs a slider with the given parent. The orientation parameter determines whether the slider is horizontal or vertical; the valid values are Qt::Vertical and Qt::Horizontal.
Destroys this slider.
Cette page est une traduction d'une page de la documentation de Qt, écrite par Nokia Corporation and/or its subsidiary(-ies). Les éventuels problèmes résultant d'une mauvaise traduction ne sont pas imputables à Nokia. | Qt 4.1 | |
Copyright © 2012 Developpez LLC. Tous droits réservés Developpez LLC. Aucune reproduction, même partielle, ne peut être faite de ce site et de l'ensemble de son contenu : textes, documents et images sans l'autorisation expresse de Developpez LLC. Sinon, vous encourez selon la loi jusqu'à 3 ans de prison et jusqu'à 300 000 E de dommages et intérêts. Cette page est déposée à la SACD. | ||
Vous avez déniché une erreur ? Un bug ? Une redirection cassée ? Ou tout autre problème, quel qu'il soit ? Ou bien vous désirez participer à ce projet de traduction ? N'hésitez pas à nous contacter ou par MP ! |
Copyright © 2000-2012 - www.developpez.com