Qt 5 compatibility
[novacoin.git] / src / qt / addressbookpage.cpp
index e20358c..5385709 100644 (file)
@@ -134,9 +134,13 @@ void AddressBookPage::setModel(AddressTableModel *model)
     // Set column widths
     ui->tableView->horizontalHeader()->resizeSection(
             AddressTableModel::Address, 320);
+#if QT_VERSION < 0x050000
     ui->tableView->horizontalHeader()->setResizeMode(
             AddressTableModel::Label, QHeaderView::Stretch);
-
+#else
+    ui->tableView->horizontalHeader()->setSectionResizeMode(
+    AddressTableModel::Label, QHeaderView::Stretch);
+#endif
     connect(ui->tableView->selectionModel(), SIGNAL(selectionChanged(QItemSelection,QItemSelection)),
             this, SLOT(selectionChanged()));