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 .

[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 () 和 metaType .

[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 .