diff options
author | Frédéric Brière <fbriere@fbriere.net> | 2016-01-10 19:06:14 -0500 |
---|---|---|
committer | Frédéric Brière <fbriere@fbriere.net> | 2016-01-10 19:20:33 -0500 |
commit | e1cef093bfc67027cb5c403f8e1e4db86fab3af0 (patch) | |
tree | 8cd51f91d6ab0f5dde71ca5ae51d7fda99b5feeb /src | |
parent | 60e8be6ad116896bdd612b7e6aaa5623dc303a4e (diff) | |
download | twinkle-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')
-rw-r--r-- | src/gui/getaddressform.cpp | 6 |
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() |