45 #include <QtCore/qvariant.h> 46 #include <QtCore/qstring.h> 70 void setValue(
const QVariant& value);
76 void setReadOnly(
bool readOnly);
77 bool isReadOnly()
const;
80 bool isAutoValue()
const;
85 { setRequiredStatus(required ? Required : Optional); }
86 void setLength(
int fieldLength);
87 void setPrecision(
int precision);
88 void setDefaultValue(
const QVariant &value);
89 void setSqlType(
int type);
90 void setGenerated(
bool gen);
91 void setAutoValue(
bool autoVal);
95 int precision()
const;
98 bool isGenerated()
const;
102 inline QT3_SUPPORT
void setNull() {
clear(); }
111 #ifndef QT_NO_DEBUG_STREAM 119 #endif // QSQLFIELD_H The QVariant class acts like a union for the most common Qt data types.
The QDebug class provides an output stream for debugging information.
#define QT_END_NAMESPACE
This macro expands to.
QVariant value() const
Returns the value of the field as a QVariant.
static void clear(QVariant::Private *d)
static LibLoadStatus status
The QString class provides a Unicode character string.
#define QT_BEGIN_NAMESPACE
This macro expands to.
RequiredStatus
Specifies whether the field is required or optional.
Type
This enum type defines the types of variable that a QVariant can contain.
bool operator!=(const QSqlField &other) const
Returns true if the field is unequal to other; otherwise returns false.
void setRequired(bool required)
Sets the required status of this field to Required if required is true; otherwise sets it to Optional...
Q_SQL_EXPORT QDebug operator<<(QDebug, const QSqlField &)
The QSqlField class manipulates the fields in SQL database tables and views.
bool operator==(QBool b1, bool b2)
static bool isNull(const QVariant::Private *d)