pqAdjustToCurrentComboBox is a QComboBox specialization whose size hint is based on the width needed to display the currently selected item, rather than the widest item in the model.
More...
#include <pqAdjustToCurrentComboBox.h>
Inherits QComboBox.
pqAdjustToCurrentComboBox is a QComboBox specialization whose size hint is based on the width needed to display the currently selected item, rather than the widest item in the model.
QComboBox::AdjustToContents (and AdjustToContentsOnFirstShow) size the combobox to fit the widest entry in the list, so the widget never shrinks back down once a long item has been added, even if a short item is currently selected. pqAdjustToCurrentComboBox instead recomputes its size hint from the current item alone, so the combobox grows and shrinks as the selection changes.
Definition at line 22 of file pqAdjustToCurrentComboBox.h.
◆ pqAdjustToCurrentComboBox()
| pqAdjustToCurrentComboBox::pqAdjustToCurrentComboBox |
( |
QWidget * |
parent = nullptr | ) |
|
◆ ~pqAdjustToCurrentComboBox()
| pqAdjustToCurrentComboBox::~pqAdjustToCurrentComboBox |
( |
| ) |
|
|
overridedefault |
◆ sizeHint()
| QSize pqAdjustToCurrentComboBox::sizeHint |
( |
| ) |
const |
|
override |
◆ minimumSizeHint()
| QSize pqAdjustToCurrentComboBox::minimumSizeHint |
( |
| ) |
const |
|
override |
The documentation for this class was generated from the following file: