- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files
- Directories
- Examples

- Class List
- Class Hierarchy
- Class Members

Public Types | Public Member Functions

# QSqlField Class Reference

Search for all occurrences

## Detailed Description

Definition at line 56 of file qsqlfield.h.

`#include <qsqlfield.h>`

List of all members.

## Public Types
enum | RequiredStatus { Unknown = -1, Optional = 0, Required = 1 }
## Public Member Functions
| QSqlField (const QString &fieldName=QString(), QVariant::Type type=QVariant::Invalid)
| QSqlField (const QSqlField &other)
QSqlField & | operator= (const QSqlField &other)
bool | operator== (const QSqlField &other) const
bool | operator!= (const QSqlField &other) const
| ~QSqlField ()
void | setValue (const QVariant &value)
QVariant | value () const
void | setName (const QString &name)
QString | name () const
bool | isNull () const
void | setReadOnly (bool readOnly)
bool | isReadOnly () const
void | clear ()
QVariant::Type | type () const
bool | isAutoValue () const
void | setType (QVariant::Type type)
void | setRequiredStatus (RequiredStatus status)
void | setRequired (bool required)
void | setLength (int fieldLength)
void | setPrecision (int precision)
void | setDefaultValue (const QVariant &value)
void | setSqlType (int type)
void | setGenerated (bool gen)
void | setAutoValue (bool autoVal)
RequiredStatus | requiredStatus () const
int | length () const
int | precision () const
QVariant | defaultValue () const
int | typeID () const
bool | isGenerated () const
bool | isValid () const

## Member Enumeration Documentation

enum RequiredStatus

Search for all occurrences

Enumerator:

  Unknown | Search for all occurrences
  Optional | Search for all occurrences
  Required | Search for all occurrences

Definition at line 59 of file qsqlfield.h.

    { Unknown = -1, Optional = 0, Required = 1 };

## Constructor & Destructor Documentation

QSqlField | ( | const QString & | fieldName = `QString()`,
|  | QVariant::Type | type = `QVariant::Invalid`
| ) |  |

QSqlField | ( | const QSqlField & | other | ) |

~QSqlField | ( |  | ) |

## Member Function Documentation

QSqlField& operator= | ( | const QSqlField & | other | ) |

bool operator== | ( | const QSqlField & | other | ) | const

bool operator!= | ( | const QSqlField & | other | ) | const `[inline]`

Definition at line 67 of file qsqlfield.h.

    { return !operator==(other); }

void setValue | ( | const QVariant & | value | ) |

Search for all occurrences

QVariant value | ( |  | ) | const `[inline]`

Search for all occurrences

Definition at line 71 of file qsqlfield.h.

        { return val; }

void setName | ( | const QString & | name | ) |

Search for all occurrences

QString name | ( |  | ) | const

Search for all occurrences

bool isNull | ( |  | ) | const

Search for all occurrences

void setReadOnly | ( | bool | readOnly | ) |

Search for all occurrences

bool isReadOnly | ( |  | ) | const

Search for all occurrences

void clear | ( |  | ) |

Search for all occurrences

QVariant::Type type | ( |  | ) | const

Search for all occurrences

bool isAutoValue | ( |  | ) | const

Search for all occurrences

void setType | ( | QVariant::Type | type | ) |

Search for all occurrences

void setRequiredStatus | ( | RequiredStatus | status | ) |

Search for all occurrences

void setRequired | ( | bool | required | ) | `[inline]`

Search for all occurrences

Definition at line 84 of file qsqlfield.h.

        { setRequiredStatus(required ? Required : Optional); }

void setLength | ( | int | fieldLength | ) |

Search for all occurrences

void setPrecision | ( | int | precision | ) |

Search for all occurrences

void setDefaultValue | ( | const QVariant & | value | ) |

Search for all occurrences

void setSqlType | ( | int | type | ) |

Search for all occurrences

void setGenerated | ( | bool | gen | ) |

Search for all occurrences

void setAutoValue | ( | bool | autoVal | ) |

Search for all occurrences

RequiredStatus requiredStatus | ( |  | ) | const

Search for all occurrences

int length | ( |  | ) | const

Search for all occurrences

int precision | ( |  | ) | const

Search for all occurrences

QVariant defaultValue | ( |  | ) | const

Search for all occurrences

int typeID | ( |  | ) | const

Search for all occurrences

bool isGenerated | ( |  | ) | const

Search for all occurrences

bool isValid | ( |  | ) | const

Search for all occurrences

The documentation for this class was generated from the following file:

- QtSql/qsqlfield.h

QSqlField QSqlField QSqlField QSqlField QSqlField QSqlField QSqlField QSqlField QSqlField QSqlField
QSqlField QSqlField QSqlField QSqlField QSqlField QSqlField QSqlField QSqlField QSqlField QSqlField