QSlider subclass with an optional read-only mode.
More...
#include <slider.h>
|
| | Slider (QWidget *parent=nullptr) |
| | Construct with an optional parent.
|
| |
| | Slider (Qt::Orientation orientation, QWidget *parent=nullptr) |
| | Construct with a specific orientation.
|
| |
| bool | isReadOnly () const |
| | Return whether the slider is read-only.
|
| |
| void | setReadOnly (bool value) |
| | Enable or disable the read-only mode.
|
| |
|
|
virtual void | mousePressEvent (QMouseEvent *event) override |
| | Suppress mouse presses when in read-only mode.
|
| |
QSlider subclass with an optional read-only mode.
Slider exposes a readOnly property. When set, mouse press events are suppressed so that the slider value cannot be changed by the user.
Definition at line 13 of file slider.h.
◆ Slider() [1/2]
| Slider::Slider |
( |
QWidget * |
parent = nullptr | ) |
|
|
explicit |
Construct with an optional parent.
- Parameters
-
| parent | Optional QWidget parent |
◆ Slider() [2/2]
| Slider::Slider |
( |
Qt::Orientation |
orientation, |
|
|
QWidget * |
parent = nullptr |
|
) |
| |
|
explicit |
Construct with a specific orientation.
- Parameters
-
| orientation | Qt::Horizontal or Qt::Vertical |
| parent | Optional QWidget parent |
◆ isReadOnly()
| bool Slider::isReadOnly |
( |
| ) |
const |
|
inline |
Return whether the slider is read-only.
- Returns
- true if user interaction is suppressed
Definition at line 34 of file slider.h.
◆ setReadOnly()
| void Slider::setReadOnly |
( |
bool |
value | ) |
|
|
inline |
Enable or disable the read-only mode.
- Parameters
-
| value | true to prevent user changes |
Definition at line 40 of file slider.h.
The documentation for this class was generated from the following file: