QLComboBoxItemDelegate Class
#include <QLayers/qlcomboboxitemdelegate.h>
Inherits: | QStyledItemDelegate, QLThemeable |
Public Functions
QLComboBoxItemDelegate(QObject* parent = nullptr) | |
QPainterPath | background_path(const QStyleOptionViewItem& option, const QModelIndex& index) const |
LAttribute* | corner_radius() const |
LAttribute* | fill() const |
virtual void | paint(QPainter* painter, const QStyleOptionViewItem& option, const QModelIndex& index) const override |
void | set_is_above_control(bool condition = true) |
LAttribute* | text_color() const |
Detailed Description
A QLComboBoxItemDelegate is a QStyledItemDelegate and a QLThemeable that serves as the default item delegate for QLComboBox.
Member Function Documentation
QLComboBoxItemDelegate(QObject* parent = nullptr)
Constructs an item delegate intended for a combo box.
QPainterPath background_path(const QStyleOptionViewItem& option, const QModelIndex& index) const
Returns a QPainterPath that represents the index item's background.
LAttribute* corner_radius() const
Returns a pointer to the delegate's corner radius attribute.
LAttribute* fill() const
Returns a pointer to the delegate's fill attribute.
void paint(QPainter* painter, const QStyleOptionViewItem& option, const QModelIndex& index) const
Virtual
Override
Renders the delegate using the given painter and style option for the item specified by index.
void set_is_above_control(bool condition = true)
Informs the item delegate about whether the items are displayed above or below the combo box.
LAttribute* text_color() const
Returns a pointer to the delegate's text color attribute.