From a80a6b3f323c1e8c4431e5269b27358a4e822f98 Mon Sep 17 00:00:00 2001 From: Uwe Rathmann Date: Mon, 2 Sep 2019 13:37:46 +0200 Subject: [PATCH] avoid deprecation warning --- playground/grids/main.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/playground/grids/main.cpp b/playground/grids/main.cpp index b68daedb..4a341d88 100644 --- a/playground/grids/main.cpp +++ b/playground/grids/main.cpp @@ -321,7 +321,7 @@ class MainWidget : public QWidget const auto r = contentsRect(); const int spacing = 5; - auto fm = m_listBox->fontMetrics(); + auto fm = QFontMetricsF( m_listBox->font() ); const int w1 = fm.width( "Test 100" ) + 20; const int w2 = r.width() - w1 - spacing;