QGIS API Documentation 3.34.0-Prizren (ffbdd678812)
|
Contains utility functions for working with QVariants and QVariant types. More...
#include <qgsvariantutils.h>
Static Public Member Functions | |
static bool | isNull (const QVariant &variant) |
Returns true if the specified variant should be considered a NULL value. | |
static QString | typeToDisplayString (QVariant::Type type, QVariant::Type subType=QVariant::Type::Invalid) |
Returns a user-friendly translated string representing a QVariant type. | |
Contains utility functions for working with QVariants and QVariant types.
Definition at line 31 of file qgsvariantutils.h.
|
static |
Returns true
if the specified variant should be considered a NULL value.
This method is more rigorous vs QVariant::isNull(), which will return false
on newer Qt versions for tests like QVariant( QDateTime() ).isNull()
.
Definition at line 164 of file qgsvariantutils.cpp.
|
static |
Returns a user-friendly translated string representing a QVariant type.
The optional subType can be used to specify the type of variant list or map values.
Definition at line 37 of file qgsvariantutils.cpp.