fix segament fault

This commit is contained in:
zhaoshixu 2022-10-19 13:45:49 +08:00
parent a6dad2d75e
commit 68150b4c36
1 changed files with 4 additions and 0 deletions

View File

@ -84,6 +84,10 @@ void MultipleDnsWidget::initComponent()
connect(m_dnsListWidget, &QListWidget::itemDoubleClicked, this, [=](QListWidgetItem *item) { connect(m_dnsListWidget, &QListWidget::itemDoubleClicked, this, [=](QListWidgetItem *item) {
m_dnsListWidget->edit(m_dnsListWidget->currentIndex()); m_dnsListWidget->edit(m_dnsListWidget->currentIndex());
item->setFlags(item->flags() | Qt::ItemIsEditable); item->setFlags(item->flags() | Qt::ItemIsEditable);
ListItemEdit *dnsListItemEdit = new ListItemEdit(m_regExp);
m_dnsListWidget ->setItemDelegateForRow(m_dnsListWidget->currentIndex().row(), dnsListItemEdit);
connect(dnsListItemEdit, SIGNAL(textChanged(QString)), this, SIGNAL(dnsTextChanged(QString)));
connect(dnsListItemEdit, SIGNAL(editingFinished()), this, SIGNAL(dnsEditingFinished()));
}); });
} }