Obsolete Members for QSqlField

以下成员源于类 QSqlField 被弃用。 提供它们是为使旧源代码能继续工作。强烈建议不要在新代码中使用它们。

公共函数

(deprecated in 6.0) QSqlField (const QString & fieldName , QVariant::Type type , const QString & table = QString())
(deprecated in 6.0) void setType (QVariant::Type type )
(deprecated in 6.0) QVariant::Type type () const

成员函数文档编制

[deprecated in 6.0] QSqlField:: QSqlField (const QString & fieldName , QVariant::Type type , const QString & table = QString())

This function is deprecated since 6.0. We strongly advise against using it in new code.

Use the constructor taking a QMetaType 代替。

这是重载函数。

Constructs an empty field called fieldName of variant type type in table .

另请参阅 setRequiredStatus (), setLength (), setPrecision (), setDefaultValue (), setGenerated (),和 setReadOnly ().

[deprecated in 6.0] void QSqlField:: setType ( QVariant::Type type )

This function is deprecated since 6.0. We strongly advise against using it in new code.

使用 setMetaType () 代替。

Sets the field's variant type to type .

另请参阅 type () 和 setMetaType ().

[deprecated in 6.0] QVariant::Type QSqlField:: type () const

This function is deprecated since 6.0. We strongly advise against using it in new code.

使用 metaType () 代替。

Returns the field's type as stored in the database. Note that the actual value might have a different type, Numerical values that are too large to store in a long int or double are usually stored as strings to prevent precision loss.

另请参阅 setType () 和 metaType ().