diff --git a/src/qt/guiutil.cpp b/src/qt/guiutil.cpp --- a/src/qt/guiutil.cpp +++ b/src/qt/guiutil.cpp @@ -419,22 +419,20 @@ } void TableViewLastColumnResizingFixer::connectViewHeadersSignals() { - connect(tableView->horizontalHeader(), - SIGNAL(sectionResized(int, int, int)), this, - SLOT(on_sectionResized(int, int, int))); - connect(tableView->horizontalHeader(), SIGNAL(geometriesChanged()), this, - SLOT(on_geometriesChanged())); + connect(tableView->horizontalHeader(), &QHeaderView::sectionResized, this, + &TableViewLastColumnResizingFixer::on_sectionResized); + connect(tableView->horizontalHeader(), &QHeaderView::geometriesChanged, + this, &TableViewLastColumnResizingFixer::on_geometriesChanged); } // We need to disconnect these while handling the resize events, otherwise we // can enter infinite loops. void TableViewLastColumnResizingFixer::disconnectViewHeadersSignals() { - disconnect(tableView->horizontalHeader(), - SIGNAL(sectionResized(int, int, int)), this, - SLOT(on_sectionResized(int, int, int))); - disconnect(tableView->horizontalHeader(), SIGNAL(geometriesChanged()), this, - SLOT(on_geometriesChanged())); -} + disconnect(tableView->horizontalHeader(), &QHeaderView::sectionResized, + this, &TableViewLastColumnResizingFixer::on_sectionResized); + disconnect(tableView->horizontalHeader(), &QHeaderView::geometriesChanged, + this, &TableViewLastColumnResizingFixer::on_geometriesChanged); +} // namespace GUIUtil // Setup the resize mode, handles compatibility for Qt5 and below as the method // signatures changed.