Qt 6.x
The Qt SDK
Loading...
Searching...
No Matches
utils.h
Go to the documentation of this file.
1// Copyright (C) 2016 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
3
4#ifndef UTILS_H
5#define UTILS_H
6
7#include "ui4.h"
8#include <qstring.h>
9#include <qlist.h>
10#include <qhash.h>
11
13
14inline bool toBool(const QString &str)
16
18{ return str ? str->text() : QString(); }
19
21{
23 for (DomProperty *p : properties)
24 map.insert(p->attributeName(), p);
25 return map;
26}
27
29
30#endif // UTILS_H
\inmodule QtCore
Definition qhash.h:818
Definition qlist.h:74
iterator insert(const Key &key, const T &value)
Definition qmap.h:687
\macro QT_RESTRICTED_CAST_FROM_ASCII
Definition qstring.h:127
int compare(const QString &s, Qt::CaseSensitivity cs=Qt::CaseSensitive) const noexcept
Definition qstring.cpp:6498
QString str
[2]
QMap< QString, QString > map
[6]
Combined button and popup list for selecting options.
@ CaseInsensitive
static const QCssKnownValue properties[NumProperties - 1]
GLfloat GLfloat p
[1]
QString toString(const DomString *str)
Definition utils.h:17
QT_BEGIN_NAMESPACE bool toBool(const QString &str)
Definition utils.h:14
QHash< QString, DomProperty * > propertyMap(const QList< DomProperty * > &properties)
Definition utils.h:20