QComboBox, how to detect user edits
-
I have got an editable QComboBox and wish to detect when the text changes due to a user edits (i.e. when the user types) , but I do not want a signal when the text is changed from code. Is there a way to do that?
@Buller
As @Bonnie has said. Note the docs difference between https://doc.qt.io/qt-5/qlineedit.html#textChanged versus https://doc.qt.io/qt-5/qlineedit.html#textEdited, which is what you are asking about. -
@Buller said in QComboBox, how to detect user edits:
QComboBox
The problem is that I cannot input the QComboBox's QLineEdit::textEdited to connect. What I think I need is:
connect(m_combo_name, &QComboBox::QLineEdit::textEdited, this, &MyWidget::slot_handle_text);
But "&QComboBox::QLineEdit::textEdited" is not valid syntax. Neither is "&QComboBox::textEdited". So what is the correct syntax here? -
@Buller said in QComboBox, how to detect user edits:
QComboBox
The problem is that I cannot input the QComboBox's QLineEdit::textEdited to connect. What I think I need is:
connect(m_combo_name, &QComboBox::QLineEdit::textEdited, this, &MyWidget::slot_handle_text);
But "&QComboBox::QLineEdit::textEdited" is not valid syntax. Neither is "&QComboBox::textEdited". So what is the correct syntax here?@Buller
editTextChanged probably -
@Buller said in QComboBox, how to detect user edits:
QComboBox
The problem is that I cannot input the QComboBox's QLineEdit::textEdited to connect. What I think I need is:
connect(m_combo_name, &QComboBox::QLineEdit::textEdited, this, &MyWidget::slot_handle_text);
But "&QComboBox::QLineEdit::textEdited" is not valid syntax. Neither is "&QComboBox::textEdited". So what is the correct syntax here?