From 05b2584fa4d773f5a88ed3ce98f5dd8304e11c34 Mon Sep 17 00:00:00 2001 From: Xavier Del Campo Romero Date: Mon, 12 Jun 2023 23:47:17 +0200 Subject: First commit --- contact.cpp | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 contact.cpp (limited to 'contact.cpp') diff --git a/contact.cpp b/contact.cpp new file mode 100644 index 0000000..bb21314 --- /dev/null +++ b/contact.cpp @@ -0,0 +1,16 @@ +#include "contact.h" + +Contact::Contact(const QString &own, const QString &other, + QListWidget *const list, QWidget *const parent) : + QListWidgetItem(list), + QWidget(parent), + own(own), + other(other) +{ + ui.setupUi(this); + ui.own_jid->setText(own); + ui.contact_jid->setText(other); + QListWidgetItem::setSizeHint(QWidget::sizeHint()); + list->addItem(this); + list->setItemWidget(this, this); +} -- cgit v1.2.3