- Qt 6.6
- Qt GUI
- C++ Classes
- QRhiDriverInfo
- Qt 6.6.2 Reference Documentation

# QRhiDriverInfo Struct

Describes the physical device, adapter, or graphics API implementation that is used by an initialized QRhi. More...

Header: | #include <QRhiDriverInfo>
CMake: | find_package(Qt6 REQUIRED COMPONENTS Gui) target_link_libraries(mytarget PRIVATE Qt6::Gui)
qmake: | QT += gui
Since: | Qt 6.6

- List of all members, including inherited members

## Public Types

enum | DeviceType { UnknownDevice, IntegratedDevice, DiscreteDevice, ExternalDevice, VirtualDevice, CpuDevice }

## Public Variables

quint64 | deviceId
QByteArray | deviceName
QRhiDriverInfo::DeviceType | deviceType
quint64 | vendorId

## Detailed Description

Graphics APIs offer different levels and kinds of information. The only value that is available across all APIs is the deviceName, which is a freetext description of the physical device, adapter, or is a combination of the strings reported for `GL_VENDOR` + `GL_RENDERER` + `GL_VERSION`. The deviceId is always 0 for OpenGL. vendorId is always 0 for OpenGL and Metal. deviceType is always UnknownDevice for OpenGL and Direct 3D.

Note: This is a RHI API with limited compatibility guarantees, see QRhi for details.

## Member Type Documentation

### enum QRhiDriverInfo::DeviceType

Specifies the graphics device's type, when the information is available. In practice this is only applicable with Vulkan and Metal. With others the value will always be UnknownDevice.

Constant | Value
--- | ---
`QRhiDriverInfo::UnknownDevice` | `0`
`QRhiDriverInfo::IntegratedDevice` | `1`
`QRhiDriverInfo::DiscreteDevice` | `2`
`QRhiDriverInfo::ExternalDevice` | `3`
`QRhiDriverInfo::VirtualDevice` | `4`
`QRhiDriverInfo::CpuDevice` | `5`

## Member Variable Documentation

### quint64 QRhiDriverInfo::deviceId

See also QRhi::driverInfo().

### QByteArray QRhiDriverInfo::deviceName

See also QRhi::driverInfo().

### QRhiDriverInfo::DeviceType QRhiDriverInfo::deviceType

See also QRhi::driverInfo() and QRhiDriverInfo::DeviceType.

### quint64 QRhiDriverInfo::vendorId

See also QRhi::driverInfo().