Fix deprecated API in network/torrent example

Change-Id: Ie4493f0d93cdeff281c3826d2ca3beb4e68d7a0f
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
(cherry picked from commit ab585356bd8815bdc17cecac0a0d5fcf54d50dff)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
Joerg Bornemann 2021-02-15 12:31:02 +01:00 committed by Qt Cherry-pick Bot
parent 90860224c8
commit 1668b12466

View File

@ -93,7 +93,7 @@ public:
progressBarOption.state = QStyle::State_Enabled;
progressBarOption.direction = QApplication::layoutDirection();
progressBarOption.rect = option.rect;
progressBarOption.fontMetrics = QApplication::fontMetrics();
progressBarOption.fontMetrics = QFontMetrics(QApplication::font());
progressBarOption.minimum = 0;
progressBarOption.maximum = 100;
progressBarOption.textAlignment = Qt::AlignCenter;