{
ui->setupUi(this);
+ m_btn_addContact = new QPushButton(this);
+ m_btn_addContact->setIcon(icons()->icon("localMonero_register.svg"));
+ ui->searchLayout->addWidget(m_btn_addContact, 0, Qt::AlignRight);
+ connect(m_btn_addContact, &QPushButton::clicked, [this]{this->newContact();});
+
m_model = m_ctx->wallet->addressBookModel();
m_proxyModel = new AddressBookProxyModel;
m_proxyModel->setSourceModel(m_model);
#ifndef FEATHER_CONTACTSWIDGET_H
#define FEATHER_CONTACTSWIDGET_H
+#include <QPushButton>
#include <QWidget>
#include <QMenu>
QMenu *m_headerMenu;
AddressBookModel * m_model;
AddressBookProxyModel * m_proxyModel;
+ QPushButton *m_btn_addContact;
};
#endif // FEATHER_CONTACTSWIDGET_H
<rect>
<x>0</x>
<y>0</y>
- <width>589</width>
- <height>416</height>
+ <width>914</width>
+ <height>763</height>
</rect>
</property>
<property name="windowTitle">
<number>0</number>
</property>
<item>
- <widget class="QLineEdit" name="search">
- <property name="placeholderText">
- <string>Search contacts...</string>
- </property>
- </widget>
+ <layout class="QHBoxLayout" name="searchLayout">
+ <item>
+ <widget class="QLineEdit" name="search">
+ <property name="placeholderText">
+ <string>Search contacts...</string>
+ </property>
+ </widget>
+ </item>
+ </layout>
</item>
<item>
<widget class="QTreeView" name="contacts">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
<property name="rootIsDecorated">
<bool>false</bool>
</property>