Added TO column to message inbox

This commit is contained in:
Jordan Sherer 2019-02-16 16:00:13 -05:00
parent f0ceb0f7f4
commit 8186348abe
2 changed files with 12 additions and 0 deletions

View File

@ -100,6 +100,12 @@ void MessageWindow::populateMessages(QList<QPair<int, Message> > 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<QPair<int, Message> > msgs){
ui->messageTableWidget->resizeColumnToContents(2);
ui->messageTableWidget->resizeColumnToContents(3);
ui->messageTableWidget->resizeColumnToContents(4);
ui->messageTableWidget->resizeColumnToContents(5);
}
ui->messageTableWidget->setUpdatesEnabled(true);

View File

@ -137,6 +137,11 @@
<string>From</string>
</property>
</column>
<column>
<property name="text">
<string>To</string>
</property>
</column>
<column>
<property name="text">
<string>Message</string>