Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
textbuilder.cpp
Go to the documentation of this file.
1// Copyright (C) 2020 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3
5#include "ui4_p.h"
6#include <QtCore/qvariant.h>
7
9
10#ifdef QFORMINTERNAL_NAMESPACE
11namespace QFormInternal {
12#endif
13
14QTextBuilder::QTextBuilder() = default;
15
16QTextBuilder::~QTextBuilder() = default;
17
18QVariant QTextBuilder::loadText(const DomProperty *property) const
19{
20 if (property->kind() == DomProperty::String)
21 return property->elementString()->text();
22 return QVariant();
23}
24
25QVariant QTextBuilder::toNativeValue(const QVariant &value) const
26{
27 return value;
28}
29
30DomProperty *QTextBuilder::saveText(const QVariant &value) const
31{
32 Q_UNUSED(value);
33 return nullptr;
34}
35
36#ifdef QFORMINTERNAL_NAMESPACE
37} // namespace QFormInternal
38#endif
39
40QT_END_NAMESPACE
Combined button and popup list for selecting options.