Returns the low-level database handle wrapped in a QVariant or an invalid variant if there is no handle.
- Use this with uttermost care and only if you know what you're doing.
The handle returned here can become a stale pointer if the connection is modified (for example, if you close the connection).
The handle can be NULL if the connection is not open yet.
The handle returned here is database-dependent, you should query the type name of the variant before accessing it.
This example retrieves the handle for a connection to sqlite:
This snippet returns the handle for PostgreSQL or MySQL:
- See also:
Definition at line 611 of file qsqldriver.cpp.