diff options
| author | Wladimir J. van der Laan <[email protected]> | 2013-05-31 14:02:24 +0200 |
|---|---|---|
| committer | Wladimir J. van der Laan <[email protected]> | 2013-06-01 11:05:08 +0200 |
| commit | 25c0cce7fb494fcb871d134e28b26504d30e34d3 (patch) | |
| tree | c6fb9d0daa4675999cfa57d4f3668e2990dc9368 /src/qt/addressbookpage.cpp | |
| parent | Merge pull request #2616 from vinniefalco/leveldb-as-subtree (diff) | |
| download | discoin-25c0cce7fb494fcb871d134e28b26504d30e34d3.tar.xz discoin-25c0cce7fb494fcb871d134e28b26504d30e34d3.zip | |
Qt5 compatibility
This commit squashes all the changes in the Qt5 branch
relative to master.
Backward compatibility with Qt4 is retained.
Original authors:
- Philip Kaufmann <[email protected]>
- Jonas Schnelli <[email protected]>
Diffstat (limited to 'src/qt/addressbookpage.cpp')
| -rw-r--r-- | src/qt/addressbookpage.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/qt/addressbookpage.cpp b/src/qt/addressbookpage.cpp index 8529c88b3..8906174d7 100644 --- a/src/qt/addressbookpage.cpp +++ b/src/qt/addressbookpage.cpp @@ -143,8 +143,13 @@ void AddressBookPage::setModel(AddressTableModel *model) ui->tableView->sortByColumn(0, Qt::AscendingOrder); // Set column widths +#if QT_VERSION < 0x050000 ui->tableView->horizontalHeader()->setResizeMode(AddressTableModel::Label, QHeaderView::Stretch); ui->tableView->horizontalHeader()->setResizeMode(AddressTableModel::Address, QHeaderView::ResizeToContents); +#else + ui->tableView->horizontalHeader()->setSectionResizeMode(AddressTableModel::Label, QHeaderView::Stretch); + ui->tableView->horizontalHeader()->setSectionResizeMode(AddressTableModel::Address, QHeaderView::ResizeToContents); +#endif connect(ui->tableView->selectionModel(), SIGNAL(selectionChanged(QItemSelection,QItemSelection)), this, SLOT(selectionChanged())); |