summaryrefslogtreecommitdiffstats
path: root/src/gui
diff options
context:
space:
mode:
authorFrédéric Brière <fbriere@fbriere.net>2016-01-10 19:06:14 -0500
committerFrédéric Brière <fbriere@fbriere.net>2016-01-10 19:20:33 -0500
commite1cef093bfc67027cb5c403f8e1e4db86fab3af0 (patch)
tree8cd51f91d6ab0f5dde71ca5ae51d7fda99b5feeb /src/gui
parent60e8be6ad116896bdd612b7e6aaa5623dc303a4e (diff)
downloadtwinkle-e1cef093bfc67027cb5c403f8e1e4db86fab3af0.tar
twinkle-e1cef093bfc67027cb5c403f8e1e4db86fab3af0.tar.gz
twinkle-e1cef093bfc67027cb5c403f8e1e4db86fab3af0.tar.lz
twinkle-e1cef093bfc67027cb5c403f8e1e4db86fab3af0.tar.xz
twinkle-e1cef093bfc67027cb5c403f8e1e4db86fab3af0.zip
Resize address book columns to contents
Automatically resize columns based on entry text widths. (This is basically a copy of commit c0d7e4a for getaddressform.)
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/getaddressform.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/gui/getaddressform.cpp b/src/gui/getaddressform.cpp
index a186885..4b1fd26 100644
--- a/src/gui/getaddressform.cpp
+++ b/src/gui/getaddressform.cpp
@@ -48,6 +48,12 @@ GetAddressForm::GetAddressForm(QWidget *parent)
m_model = new AddressTableModel(this, ab_local->get_address_list());
localListView->setModel(m_model);
+
+#if QT_VERSION >= 0x050000
+ localListView->horizontalHeader()->setSectionResizeMode(QHeaderView::ResizeToContents);
+#else
+ localListView->horizontalHeader()->setResizeMode(QHeaderView::ResizeToContents);
+#endif
}
GetAddressForm::~GetAddressForm()