ComboBox is an advanced QComboBox. It adds multiple features:
More...
#include <comboBox.h>
|
virtual void | paintEvent (QPaintEvent *event) |
| Reimplemented for internal reasons.
|
|
virtual void | changeEvent (QEvent *event) |
|
virtual void | wheelEvent (QWheelEvent *event) |
|
ComboBox is an advanced QComboBox. It adds multiple features:
- Display a default text and/or icon when the combobox current index is invalid (-1). A typical default text would be "Select a XXX...". forceDefault can force the display of the default text at all time (with a valid current index). The text displayed in the combo box can be elided when the size is too small.
- Optionally prevent the mouse scroll events from changing the current index. ComboBox works exactly the same as QComboBox by default.
- See also
- QComboBox
turn into flags ?
Enumerator |
---|
NeverScroll |
Scrolling is not possible with the mouse wheel.
|
AlwaysScroll |
Scrolling is always possible with the mouse wheel.
|
ScrollWithFocus |
Scrolling is only possible if the combobox has the focus. The focus policy is automatically set to Qt::StrongFocus
|
ScrollWithNoVScrollBar |
Scrolling is not possible when the combobox is inside a scrollarea with a visible vertical scrollbar.
|
void ComboBox::forceDefault |
( |
bool |
forceDefault | ) |
|
Force the display of the text/icon at all time (not only when the current index is invalid). False by default.
Return the scrollWheelEffect property value.
- See also
- scrollEffect
void ComboBox::setElideMode |
( |
const Qt::TextElideMode & |
newMode | ) |
|
setElideMode can elide the text displayed on the combobox. Qt::ElideNone by default (same behavior as QComboBox)
Set the scrollWheelEffect property value.
- See also
- scrollEffect
QSize ComboBox::sizeHint |
( |
| ) |
const |
|
virtual |
Reimplemented for internal reasons.
This implementation caches the size hint to avoid resizing when the contents change dynamically. To invalidate the cached value change the sizeAdjustPolicy.
This property controls the behavior of the mouse scroll wheel. ScrollOn by default. /sa scrollWheelEffect, setScrollWheelEffect
The documentation for this class was generated from the following files:
- D:/itom/sources/itom/itomWidgets/comboBox.h
- D:/itom/sources/itom/itomWidgets/comboBox.cpp