Loading...
Searching...
No Matches
CompletionComboBox Class Reference

CompletionComboBox is a subclass of QComboBox intended to have a more familiar user experience when working with auto-completion. More...

Detailed Description

CompletionComboBox is a subclass of QComboBox intended to have a more familiar user experience when working with auto-completion.

Most notably, the <TAB> keypress is intercepted so that the tab key can be used to cycle through completion options. This is similar the behavior found in most text editors and IDEs.

Additionally, the combo box is editable and uses case-sensitive matching, popup-style completion, and a "no insert" policy by default.

Signals

void enterPressed ()

Public Member Functions

 CompletionComboBox (QWidget *parent=nullptr)
void setForwardReturnEvents (bool forward)
void setFuzzySortingEnabled (bool enabled)
 Filter and sort completion results by FuzzyMatchContextual score, highest first.
bool isFuzzySortingEnabled () const

Protected Member Functions

bool event (QEvent *event) override

Constructor & Destructor Documentation

◆ CompletionComboBox()

CompletionComboBox::CompletionComboBox ( QWidget * parent = nullptr)

Member Function Documentation

◆ event()

bool CompletionComboBox::event ( QEvent * event)
overrideprotected

◆ setForwardReturnEvents()

void CompletionComboBox::setForwardReturnEvents ( bool forward)
inline

◆ setFuzzySortingEnabled()

void CompletionComboBox::setFuzzySortingEnabled ( bool enabled)

Filter and sort completion results by FuzzyMatchContextual score, highest first.

Disabled by default. Matches need not be prefixes; equal scores and empty input preserve the source model's order.

◆ isFuzzySortingEnabled()

bool CompletionComboBox::isFuzzySortingEnabled ( ) const
inline

◆ enterPressed

void CompletionComboBox::enterPressed ( )
signal