KanoopGuiQt 1.3.0
Qt GUI utility library
Loading...
Searching...
No Matches
CheckBox Class Reference

QCheckBox subclass with an optional read-only mode. More...

#include <checkbox.h>

+ Inheritance diagram for CheckBox:
+ Collaboration diagram for CheckBox:

Public Slots

void setReadOnly (bool value)
 Enable or disable the read-only mode.
 

Public Member Functions

 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.
 

Properties

bool readOnly
 Whether the checkbox ignores user mouse presses.
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ CheckBox() [1/2]

CheckBox::CheckBox ( QWidget *  parent = nullptr)
explicit

Construct with an optional parent.

Parameters
parentOptional QWidget parent

◆ CheckBox() [2/2]

CheckBox::CheckBox ( const QString &  text,
QWidget *  parent = nullptr 
)
explicit

Construct with initial label text.

Parameters
textCheckbox label
parentOptional QWidget parent

Member Function Documentation

◆ 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
valuetrue to prevent user changes

Definition at line 43 of file checkbox.h.

Property Documentation

◆ readOnly

bool CheckBox::readOnly
readwrite

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: