This commit introduces a button to create a new contact because when the contact table is full of contacts, you cannot do 'right-click -> New contact'.

This commit is contained in:
dsc
2022-04-24 16:38:24 +02:00
parent fb32fa2fd2
commit 3051ce5118
3 changed files with 39 additions and 19 deletions
+4
View File
@@ -32,6 +32,10 @@ ContactsWidget::ContactsWidget(QWidget *parent) :
this->newContact();
});
connect(ui->btn_addContact, &QPushButton::pressed, [this]{
this->newContact();
});
connect(ui->contacts, &QTreeView::customContextMenuRequested, [=](const QPoint & point){
QModelIndex index = ui->contacts->indexAt(point);
if (index.isValid()) {