Obsolete Members for QComboBox

The following members of class QComboBox are obsolete. They are provided to keep old source code working. We strongly advise against using them in new code.

Properties

Public Functions

(obsolete) bool autoCompletion() const
(obsolete) Qt::CaseSensitivity autoCompletionCaseSensitivity() const
(obsolete) void setAutoCompletion(bool enable)
(obsolete) void setAutoCompletionCaseSensitivity(Qt::CaseSensitivity sensitivity)

Signals

(obsolete) void activated(const QString &text)
(obsolete) void currentIndexChanged(const QString &text)
(obsolete) void highlighted(const QString &text)

Property Documentation

autoCompletion : bool

This property is obsolete. It is provided to keep old source code working. We strongly advise against using it in new code.

This property holds whether the combobox provides auto-completion for editable items

Use setCompleter() instead.

By default, this property is true.

This property was introduced in Qt 4.1.

Access functions:

bool autoCompletion() const
void setAutoCompletion(bool enable)

See also editable.

autoCompletionCaseSensitivity : Qt::CaseSensitivity

This property is obsolete. It is provided to keep old source code working. We strongly advise against using it in new code.

This property holds whether string comparisons are case-sensitive or case-insensitive for auto-completion

By default, this property is Qt::CaseInsensitive.

Use setCompleter() instead. Case sensitivity of the auto completion can be changed using QCompleter::setCaseSensitivity().

Access functions:

Qt::CaseSensitivity autoCompletionCaseSensitivity() const
void setAutoCompletionCaseSensitivity(Qt::CaseSensitivity sensitivity)

See also autoCompletion.

Member Function Documentation

[signal] void QComboBox::activated(const QString &text)

This function is obsolete. It is provided to keep old source code working. We strongly advise against using it in new code.

This signal is sent when the user chooses an item in the combobox. The item's text is passed. Note that this signal is sent even when the choice is not changed. If you need to know when the choice actually changes, use signal currentIndexChanged() or currentTextChanged().

Use QComboBox::textActivated() instead

Note: Signal activated is overloaded in this class. To connect to this signal by using the function pointer syntax, Qt provides a convenient helper for obtaining the function pointer as shown in this example:

connect(comboBox, QOverload<const QString &>::of(&QComboBox::activated),
    [=](const QString &text){ /* ... */ });

[signal] void QComboBox::currentIndexChanged(const QString &text)

This function is obsolete. It is provided to keep old source code working. We strongly advise against using it in new code.

This signal is sent whenever the currentIndex in the combobox changes either through user interaction or programmatically. The item's text is passed.

Use currentIndexChanged(int) and get the text from the itemText(int) method.

Note: Signal currentIndexChanged is overloaded in this class. To connect to this signal by using the function pointer syntax, Qt provides a convenient helper for obtaining the function pointer as shown in this example:

connect(comboBox, QOverload<const QString &>::of(&QComboBox::currentIndexChanged),
    [=](const QString &text){ /* ... */ });

This function was introduced in Qt 4.1.

[signal] void QComboBox::highlighted(const QString &text)

This function is obsolete. It is provided to keep old source code working. We strongly advise against using it in new code.

This signal is sent when an item in the combobox popup list is highlighted by the user. The item's text is passed.

Use textHighlighted() instead

Note: Signal highlighted is overloaded in this class. To connect to this signal by using the function pointer syntax, Qt provides a convenient helper for obtaining the function pointer as shown in this example:

connect(comboBox, QOverload<const QString &>::of(&QComboBox::highlighted),
    [=](const QString &text){ /* ... */ });

bool QComboBox::autoCompletion() const

This function is obsolete. It is provided to keep old source code working. We strongly advise against using it in new code.

Use completer() instead.

Note: Getter function for property autoCompletion.

See also setAutoCompletion().

Qt::CaseSensitivity QComboBox::autoCompletionCaseSensitivity() const

This function is obsolete. It is provided to keep old source code working. We strongly advise against using it in new code.

Use setCompleter() and QCompleter::setCaseSensitivity() instead.

Note: Getter function for property autoCompletionCaseSensitivity.

See also setAutoCompletionCaseSensitivity().

void QComboBox::setAutoCompletion(bool enable)

This function is obsolete. It is provided to keep old source code working. We strongly advise against using it in new code.

Use setCompleter() instead.

Note: Setter function for property autoCompletion.

See also autoCompletion().

void QComboBox::setAutoCompletionCaseSensitivity(Qt::CaseSensitivity sensitivity)

This function is obsolete. It is provided to keep old source code working. We strongly advise against using it in new code.

Use setCompleter() and QCompleter::setCaseSensitivity() instead.

Note: Setter function for property autoCompletionCaseSensitivity.

See also autoCompletionCaseSensitivity().

© 2024 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.