Page Contents

Topics

Classes

QLComboBox Class

#include <QLayers/qlcombobox.h>

Inherits: QComboBox, QLThemeable
Inherited By: QLThemeComboBox

Public Functions

QLComboBox(QWidget* parent = nullptr)
LAttribute* border_fill() const
LAttribute* border_thickness() const
virtual QList<QLThemeable*> child_qlthemeables(Qt::FindChildOptions options = Qt::FindDirectChildrenOnly) override
LAttribute* corner_radius() const
LAttribute* fill() const
void setFixedHeight(int h)
void setFixedSize(const QSize& s)
void setFixedSize(int w, int h)
void setFixedWidth(int w)
virtual void showPopup() override
LAttribute* text_color() const
virtual void update() override

Protected Functions

virtual bool eventFilter(QObject* object, QEvent* event) override
bool is_view_positioned_above() const
void paint_box(QPainter* painter)
virtual void paintEvent(QPaintEvent* event) override

Detailed Description

QLComboBox Example

A QLComboBox is a QComboBox and a QLThemeable that provides the user with a way to select an option from a list.

QLComboBoxItemDelegate was created to serve as the default item delegate for QLComboBox.

Member Function Documentation

QLComboBox(QWidget* parent = nullptr)

Constructs a combo box.

LAttribute* border_fill() const

Returns a pointer to the combo box's border fill attribute.

LAttribute* border_thickness() const

Returns a pointer to the combo box's border thickness attribute.

QList<QLThemeable*> child_qlthemeables(Qt::FindChildOptions options = Qt::FindDirectChildrenOnly)

Virtual

Override

Returns a list of child themeables.

This function overrides QLThemeable::child_qlthemeables() to include the item delegate of the combo box and any children it might have.

LAttribute* corner_radius() const

Returns a pointer to the combo box's corner radius attribute.

LAttribute* fill() const

Returns a pointer to the combo box's fill attribute.

void setFixedHeight(int h)

Sets both the minimum and maximum heights of the widget to h without changing the widths.

void setFixedSize(const QSize& s)

Sets both the minimum and maximum sizes of the widget to s, thereby preventing it from ever growing or shrinking.

void setFixedSize(int w, int h)

Sets the width of the widget to w and the height to h.

void setFixedWidth(int w)

Sets both the minimum and maximum width of the widget to w without changing the heights.

void showPopup()

Virtual

Override

Displays the list of items in the combo box.

This function overrides QComboBox::showPopup() to inform the item delegate about whether the popup is being displayed above or below the combo box, if the item delegate is a QLComboBoxItemDelegate.

LAttribute* text_color() const

Returns a pointer to the combo box's text color attribute.

void update()

Virtual

Override

Updates the combo box.

This function overrides QLThemeable::update() to update the combo box's style sheet.