QCheckBox subclass with an optional read-only mode.
More...
#include <checkbox.h>
|
| void | setReadOnly (bool value) |
| | Enable or disable the read-only mode.
|
| |
|
| | CheckBox (QWidget *parent=nullptr) |
| | Construct with an optional parent.
|
| |
| | CheckBox (const QString &text, QWidget *parent=nullptr) |
| | Construct with initial label text.
|
| |
| bool | isReadOnly () const |
| | Return whether the checkbox is read-only.
|
| |
|
| bool | readOnly |
| | Whether the checkbox ignores user mouse presses.
|
| |
QCheckBox subclass with an optional read-only mode.
CheckBox exposes a readOnly property. When set, mouse press events are suppressed so that the check state cannot be changed by the user.
Definition at line 13 of file checkbox.h.
◆ CheckBox() [1/2]
| CheckBox::CheckBox |
( |
QWidget * |
parent = nullptr | ) |
|
|
explicit |
Construct with an optional parent.
- Parameters
-
| parent | Optional QWidget parent |
◆ CheckBox() [2/2]
| CheckBox::CheckBox |
( |
const QString & |
text, |
|
|
QWidget * |
parent = nullptr |
|
) |
| |
|
explicit |
Construct with initial label text.
- Parameters
-
| text | Checkbox label |
| parent | Optional QWidget parent |
◆ isReadOnly()
| bool CheckBox::isReadOnly |
( |
| ) |
const |
|
inline |
Return whether the checkbox is read-only.
- Returns
- true if user interaction is suppressed
Definition at line 36 of file checkbox.h.
◆ setReadOnly
| void CheckBox::setReadOnly |
( |
bool |
value | ) |
|
|
inlineslot |
Enable or disable the read-only mode.
- Parameters
-
| value | true to prevent user changes |
Definition at line 43 of file checkbox.h.
◆ readOnly
Whether the checkbox ignores user mouse presses.
Definition at line 16 of file checkbox.h.
The documentation for this class was generated from the following file: