From 4a9778e33faeb615283218e2a037d30045399263 Mon Sep 17 00:00:00 2001 From: Arno Date: Sun, 8 Sep 2019 23:10:12 +0200 Subject: Fix deprecation warning FontMetrics.with seems to be obsolete. --- collectionfavoritesview.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/collectionfavoritesview.cpp b/collectionfavoritesview.cpp index b948c41..b235c3a 100644 --- a/collectionfavoritesview.cpp +++ b/collectionfavoritesview.cpp @@ -40,7 +40,7 @@ void CollectionFavoritesView::populate(){ favQ2.exec(); favQ2.next(); QFontMetrics fm(QFont("courier")); - QString songTitle = fm.elidedText(favQ1.value(2).toString(), Qt::ElideRight, fm.width('X') * 28); + QString songTitle = fm.elidedText(favQ1.value(2).toString(), Qt::ElideRight, fm.horizontalAdvance('X') * 28); QString songText = QString("%1 - %2 - %3").arg(favQ1.value(0).toString(), -25).arg(songTitle, -30).arg(favQ1.value(1).toString()); curSong->setText(songText); curSong->setIcon(songIcon); -- cgit v1.2.3-70-g09d2