Commit d58f99cf authored by Laurent Montel's avatar Laurent Montel 😁

We can use QMetaObject::invokeMethod + lamdba in qt5.10

parent b284246c
......@@ -320,14 +320,22 @@ void ArticleListView::startResizingTitleColumn()
// Interactive so that the user can still resize the column himself if he
// wants to
header()->setSectionResizeMode(ArticleModel::ItemTitleColumn, QHeaderView::Stretch);
#if QT_VERSION >= QT_VERSION_CHECK(5, 10, 0)
QMetaObject::invokeMethod(this, &ArticleListView::finishResizingTitleColumn, Qt::QueuedConnection);
#else
QMetaObject::invokeMethod(this, "finishResizingTitleColumn", Qt::QueuedConnection);
#endif
}
void ArticleListView::finishResizingTitleColumn()
{
if (QApplication::mouseButtons() != Qt::NoButton) {
// Come back later: user is still resizing the widget
#if QT_VERSION >= QT_VERSION_CHECK(5, 10, 0)
QMetaObject::invokeMethod(this, &ArticleListView::finishResizingTitleColumn, Qt::QueuedConnection);
#else
QMetaObject::invokeMethod(this, "finishResizingTitleColumn", Qt::QueuedConnection);
#endif
return;
}
header()->setSectionResizeMode(QHeaderView::Interactive);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment