#include <menuComboBox.h>
|
| enum | EditableBehavior { NotEditable = 0
, Editable
, EditableOnFocus
, EditableOnPopup
} |
| |
|
typedef QWidget | Superclass |
| | Superclass typedef.
|
| |
|
|
void | clearActiveAction () |
| |
|
void | setToolButtonStyle (Qt::ToolButtonStyle style) |
| |
|
QVariantList | __unittestVariantList (const QVariantList &list) |
| | this slot only returns the argument list for unittest purposes.
|
| |
|
int | __unittestInt (int value) |
| |
|
qint64 | __unittestInt64 (qint64 value) |
| |
|
quint64 | __unittestUInt64 (quint64 value) |
| |
|
float | __unittestFloat (float value) |
| |
|
double | __unittestDouble (double value) |
| |
|
short | __unittestShort (short value) |
| |
|
|
void | actionChanged (QAction *action) |
| |
|
void | popupShown () |
| |
|
|
| MenuComboBox (QWidget *parent=0) |
| |
| Q_INVOKABLE void | setMenu (QMenu *menu) |
| |
|
Q_INVOKABLE QMenu * | menu () const |
| |
| Q_INVOKABLE void | setCompleterMenu (QMenu *menu) |
| |
|
Q_INVOKABLE QMenu * | completerMenu () const |
| |
|
void | setDefaultText (const QString &) |
| |
|
QString | defaultText () const |
| |
|
void | setDefaultIcon (const QIcon &) |
| |
|
QIcon | defaultIcon () const |
| |
|
void | setEditableBehavior (EditableBehavior editBehavior) |
| |
|
EditableBehavior | editableBehavior () const |
| |
|
void | setSearchIconVisible (bool state) |
| |
|
bool | isSearchIconVisible () const |
| |
|
Qt::ToolButtonStyle | toolButtonStyle () const |
| |
| void | setMinimumContentsLength (int characters) |
| |
|
QComboBox * | menuComboBoxInternal () const |
| | Return the internal combo box.
|
| |
|
QToolButton * | toolButtonInternal () const |
| | Return the internal tool button.
|
| |
|
Completer * | searchCompleter () const |
| | Return the internal completer.
|
| |
|
| void | onActionSelected (QAction *action) |
| |
|
void | onEditingFinished () |
| | action selected from the line edit or the completer.
|
| |
|
|
virtual bool | eventFilter (QObject *target, QEvent *event) |
| |
QComboBox linked with a QMenu. See MenuComboBox::setMenu() MenuComboBox can be editable, disable, editable on focus or editable on double click. if it is editable : the comboBox is always editable, you can filter the Menu or show it. if it is editable on focus - on double click: the combobox become editable when it has the focus in. So MenuComboBox's purpose is to filter a menu, if you edit the current text or show the menu, if you click on the arrow. if it is disabled : the MenuComboBox has the same behavior as a QPushButton. You can't filter the menu. By default MenuComboBox is not editable with the search icon visible. See MenuComboBox::setEditableType() to change the default behavior. and setIconSearchVisible() to show/hide the icon.
◆ onActionSelected
| void MenuComboBox::onActionSelected |
( |
QAction * | action | ) |
|
|
protectedslot |
Change the current text/icon on the QComboBox And trigger the action. action selected from the menu.
Set the action selected in the combobox.
◆ setCompleterMenu()
| void MenuComboBox::setCompleterMenu |
( |
QMenu * | menu | ) |
|
Set a specific menu to the Completer.
This is useful when the menu displayed with the combobox is only a subset of the action that can be searched for.
- See also
- setMenu(), searchCompleter()
◆ setMenu()
| void MenuComboBox::setMenu |
( |
QMenu * | menu | ) |
|
◆ setMinimumContentsLength()
| void MenuComboBox::setMinimumContentsLength |
( |
int | characters | ) |
|
Set the minimum width of the combobox.
- See also
- QComboBox::setMinimumContentsLength()
◆ defaultIcon
| QIcon MenuComboBox::defaultIcon |
|
readwrite |
This property holds the icon shown on the combobox when the current item (QAction) doesn't have any icon associated. Empty by default
◆ defaultText
| QString MenuComboBox::defaultText |
|
readwrite |
This property holds the text shown on the combobox when there is no selected item. Empty by default.
◆ editBehavior
| EditableBehavior MenuComboBox::editBehavior |
|
readwrite |
This property holds the edit behavior of the combobox, it defines what action is needed to turn the combobox into a search mode where the user can type the name of the item to select using the combobox line edit. MenuComboBox::NotEditable by default
- See also
- EditableType
◆ searchIconVisible
| bool MenuComboBox::searchIconVisible |
|
readwrite |
This property controls whether the search tool button is visible or hidden. True by default
◆ toolButtonStyle
| Qt::ToolButtonStyle MenuComboBox::toolButtonStyle |
|
readwrite |
This property holds whether the search tool button displays an icon only, text only, or text beside/below the icon. The default is Qt::ToolButtonIconOnly.
- See also
- QToolButton::toolButtonStyle
The documentation for this class was generated from the following files:
- C:/Workspace/itom_development_VS2019_Qt5.15.2_x64/itomProject/itom/itomWidgets/menuComboBox.h
- C:/Workspace/itom_development_VS2019_Qt5.15.2_x64/itomProject/itom/itomWidgets/menuComboBox.cpp