A ComboBox that displays multiple checkable items and summarizes selection.
More...
#include <CheckableItemComboBox.h>
|
| | CheckableItemComboBox (QWidget *parent=nullptr) |
| | Construct the widget.
|
| QStandardItem * | addCheckItem (QString const &label, QVariant const &data, Qt::CheckState checkState) |
| | Add a checkable item to the combobox model.
|
|
Q_SIGNAL void | about_to_show_popup () |
| | Emitted immediately before the popup is shown.
|
|
Q_SIGNAL void | popup_hidden () |
| | Emitted after the popup has been hidden.
|
| | LazyFillComboBox (QWidget *parent=nullptr) |
| | Construct a LazyFillComboBox.
|
|
void | showPopup () override |
| | Override to emit about_to_show_popup() before showing.
|
|
void | hidePopup () override |
| | Override to emit popup_hidden() after hiding the popup.
|
|
|
bool | eventFilter (QObject *, QEvent *) override |
| | Event filter to intercept model and item events.
|
A ComboBox that displays multiple checkable items and summarizes selection.
Items added via addCheckItem() are represented by QStandardItems with check states; the widget updates its displayed text to reflect selected entries and forwards item press events to update the model state.
◆ CheckableItemComboBox()
| CheckableItemComboBox::CheckableItemComboBox |
( |
QWidget * | parent = nullptr | ) |
|
|
explicit |
Construct the widget.
- Parameters
-
| parent | Optional parent widget. |
◆ addCheckItem()
| QStandardItem * CheckableItemComboBox::addCheckItem |
( |
QString const & | label, |
|
|
QVariant const & | data, |
|
|
Qt::CheckState | checkState ) |
Add a checkable item to the combobox model.
- Parameters
-
| label | Visible item label. |
| data | Associated user data. |
| checkState | Initial check state for the item. |
- Returns
- The created QStandardItem pointer.
The documentation for this class was generated from the following files: