summaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
authorJoerg Bornemann <joerg.bornemann@qt.io>2021-02-15 12:31:02 +0100
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2021-02-15 18:20:51 +0000
commit1668b12466c001b1b3a022acfa9136536abd522f (patch)
treea3c27c58d937fe6581c5f06b51a13c425c5b1a99 /examples
parent90860224c81afc2a1733117a7bea0d21f47b83fb (diff)
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>
Diffstat (limited to 'examples')
-rw-r--r--examples/network/torrent/mainwindow.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/examples/network/torrent/mainwindow.cpp b/examples/network/torrent/mainwindow.cpp
index 129ded3fa4..10a54e7962 100644
--- a/examples/network/torrent/mainwindow.cpp
+++ b/examples/network/torrent/mainwindow.cpp
@@ -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;