send Memo to selected Contact

This commit is contained in:
DenioD
2020-04-29 00:51:07 +02:00
parent a5020cbe24
commit e9ae0e78c5
6 changed files with 82 additions and 17 deletions

View File

@@ -988,7 +988,22 @@ void MainWindow::setupchatTab() {
// Send button
QObject::connect(ui->sendChatButton, &QPushButton::clicked, this, &MainWindow::sendChatButton);
///////// Set selected Zaddr for Chat with Doubleklick
QObject::connect(ui->listContactWidget, &QTableView::doubleClicked, [=] () {
for (auto p : AddressBook::getInstance()->getAllAddressLabels()) {
QModelIndex index = ui->listContactWidget->currentIndex();
QString itemText = index.data(Qt::DisplayRole).toString();
ui->ContactZaddr->setText(itemText);
}
/// ui->listContactWidget->setCurrentRow(1)
});
}
ChatMemoEdit::ChatMemoEdit(QWidget* parent) : QPlainTextEdit(parent) {
QObject::connect(this, &QPlainTextEdit::textChanged, this, &ChatMemoEdit::updateDisplay);