diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index d96ade5..f1861d6 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -2,14 +2,9 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-# pthread
find_package(Threads REQUIRED)
-
-if(QML)
- # PNG
- find_package(ZLIB REQUIRED)
- find_package(PNG REQUIRED)
-endif()
+find_package(ZLIB REQUIRED)
+find_package(PNG REQUIRED)
# Compile these source files (.h/.cpp)
file(GLOB SOURCE_FILES
diff --git a/src/contactswidget.cpp b/src/contactswidget.cpp
index 387411d..a723da9 100644
--- a/src/contactswidget.cpp
+++ b/src/contactswidget.cpp
@@ -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()) {
diff --git a/src/contactswidget.ui b/src/contactswidget.ui
index 69151e6..f40a8f4 100644
--- a/src/contactswidget.ui
+++ b/src/contactswidget.ui
@@ -6,17 +6,14 @@
0
0
- 589
- 416
+ 310
+ 283
Form
-
-
- 9
-
+
0
@@ -29,14 +26,38 @@
0
- -
-
-
- Search contacts...
+
+ 9
+
+
-
+
+
+ 9
-
+ -
+
+
+ Search contacts...
+
+
+
+ -
+
+
+ Qt::Vertical
+
+
+
+ -
+
+
+ New contact
+
+
+
+
- -
+
-
false