From 8186348abe8bff1cb584cf97b7c62898b1b55d99 Mon Sep 17 00:00:00 2001 From: Jordan Sherer Date: Sat, 16 Feb 2019 16:00:13 -0500 Subject: [PATCH] Added TO column to message inbox --- messagewindow.cpp | 7 +++++++ messagewindow.ui | 5 +++++ 2 files changed, 12 insertions(+) diff --git a/messagewindow.cpp b/messagewindow.cpp index 9a56396..96d468c 100644 --- a/messagewindow.cpp +++ b/messagewindow.cpp @@ -100,6 +100,12 @@ void MessageWindow::populateMessages(QList > msgs){ fromItem->setTextAlignment(Qt::AlignHCenter|Qt::AlignVCenter); ui->messageTableWidget->setItem(row, col++, fromItem); + auto to = params.value("TO").toString(); + auto toItem = new QTableWidgetItem(to); + toItem->setData(Qt::UserRole, to); + toItem->setTextAlignment(Qt::AlignHCenter|Qt::AlignVCenter); + ui->messageTableWidget->setItem(row, col++, toItem); + auto text = params.value("TEXT").toString(); auto textItem = new QTableWidgetItem(text); textItem->setData(Qt::UserRole, text); @@ -112,6 +118,7 @@ void MessageWindow::populateMessages(QList > msgs){ ui->messageTableWidget->resizeColumnToContents(2); ui->messageTableWidget->resizeColumnToContents(3); ui->messageTableWidget->resizeColumnToContents(4); + ui->messageTableWidget->resizeColumnToContents(5); } ui->messageTableWidget->setUpdatesEnabled(true); diff --git a/messagewindow.ui b/messagewindow.ui index b2f369a..1e39aa2 100644 --- a/messagewindow.ui +++ b/messagewindow.ui @@ -137,6 +137,11 @@ From + + + To + + Message