Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
src_gui_text_qfontmetrics.cpp
Go to the documentation of this file.
1// Copyright (C) 2016 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
3#include <QFont>
4#include <QFontMetrics>
5
7
8void wrapper0() {
10QFont font("times", 24);
12int pixelsWide = fm.horizontalAdvance("What's the advance width of this text?");
13int pixelsHigh = fm.height();
15
16Q_UNUSED(pixelsWide);
17Q_UNUSED(pixelsHigh);
18} // wrapper0
19
20
21void wrapper1() {
23QFont font("times", 24);
25qreal pixelsWide = fm.horizontalAdvance("What's the advance width of this text?");
26qreal pixelsHigh = fm.height();
28
29Q_UNUSED(pixelsWide);
30Q_UNUSED(pixelsHigh);
31} // wrapper1
32
33} //src_gui_text_qfontmetrics
\reentrant \inmodule QtGui
\reentrant \inmodule QtGui
\reentrant
Definition qfont.h:22
#define Q_UNUSED(x)
double qreal
Definition qtypes.h:187