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
qwasmtheme.cpp
Go to the documentation of this file.
1// Copyright (C) 2018 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
3
4#include "qwasmtheme.h"
5#include <QtCore/qvariant.h>
6#include <QFontDatabase>
7#include <QList>
8
10
11using namespace Qt::StringLiterals;
12
14{
15 for (auto family : QFontDatabase::families())
17 fixedFont = new QFont(family);
18}
19
21{
22 if (fixedFont)
23 delete fixedFont;
24}
25
34
36{
38 return fixedFont;
39 }
40 return nullptr;
41}
42
static QStringList families(WritingSystem writingSystem=Any)
Returns a sorted list of the available font families which support the writingSystem.
static bool isFixedPitch(const QString &family, const QString &style=QString())
Returns true if the font that has family family and style style is fixed pitch; otherwise returns fal...
\reentrant
Definition qfont.h:22
virtual QVariant themeHint(ThemeHint hint) const
ThemeHint
This enum describes the available theme hints.
\inmodule QtCore
Definition qvariant.h:65
QFont * fixedFont
Definition qwasmtheme.h:28
QVariant themeHint(ThemeHint hint) const override
const QFont * font(Font type) const override
Combined button and popup list for selecting options.
QList< QString > QStringList
Constructs a string list that contains the given string, str.
GLenum type
static QT_BEGIN_NAMESPACE QVariant hint(QPlatformIntegration::StyleHint h)