Provides information about existing serial ports. More...
Header: | #include <QSerialPortInfo> |
qmake: | QT += serialport |
Since: | Qt 5.1 |
QSerialPortInfo() | |
QSerialPortInfo(const QSerialPort &port) | |
QSerialPortInfo(const QString &name) | |
QSerialPortInfo(const QSerialPortInfo &other) | |
~QSerialPortInfo() | |
QString | description() const |
bool | hasProductIdentifier() const |
bool | hasVendorIdentifier() const |
bool | isBusy() const |
bool | isNull() const |
QString | manufacturer() const |
QString | portName() const |
quint16 | productIdentifier() const |
QString | serialNumber() const |
void | swap(QSerialPortInfo &other) |
QString | systemLocation() const |
quint16 | vendorIdentifier() const |
QSerialPortInfo & | operator=(const QSerialPortInfo &other) |
QList<QSerialPortInfo> | availablePorts() |
QList<qint32> | standardBaudRates() |
Provides information about existing serial ports.
Use the static functions to generate a list of QSerialPortInfo objects. Each QSerialPortInfo object in the list represents a single serial port and can be queried for the port name, system location, description, and manufacturer. The QSerialPortInfo class can also be used as an input parameter for the setPort() method of the QSerialPort class.
See also QSerialPort.
Constructs an empty QSerialPortInfo object.
See also isNull().
Constructs a QSerialPortInfo object from serial port.
Constructs a QSerialPortInfo object from serial port name.
This constructor finds the relevant serial port among the available ones according to the port name name, and constructs the serial port info instance for that port.
Constructs a copy of other.
Destroys the QSerialPortInfo object. References to the values in the object become invalid.
[static]
QList<QSerialPortInfo> QSerialPortInfo::availablePorts()Returns a list of available serial ports on the system.
Returns the description string of the serial port, if available; otherwise returns an empty string.
See also manufacturer() and serialNumber().
Returns true
if there is a valid 16-bit
product number present; otherwise returns false
.
See also productIdentifier(), vendorIdentifier(), and hasVendorIdentifier().
Returns true
if there is a valid 16-bit
vendor number present; otherwise returns false
.
See also vendorIdentifier(), productIdentifier(), and hasProductIdentifier().
Returns true
if serial port is busy; otherwise returns false
.
See also isNull().
Returns whether this QSerialPortInfo object holds a serial port definition.
See also isBusy().
Returns the manufacturer string of the serial port, if available; otherwise returns an empty string.
See also description() and serialNumber().
Returns the name of the serial port.
See also systemLocation().
Returns the 16-bit product number for the serial port, if available; otherwise returns zero.
See also hasProductIdentifier(), vendorIdentifier(), and hasVendorIdentifier().
Returns the serial number string of the serial port, if available; otherwise returns an empty string.
Note: The serial number may include letters.
This function was introduced in Qt 5.3.
See also description() and manufacturer().
[static]
QList<qint32> QSerialPortInfo::standardBaudRates()Returns a list of available standard baud rates supported by the target platform.
Swaps QSerialPortInfo other with this QSerialPortInfo. This operation is very fast and never fails.
Returns the system location of the serial port.
See also portName().
Returns the 16-bit vendor number for the serial port, if available; otherwise returns zero.
See also hasVendorIdentifier(), productIdentifier(), and hasProductIdentifier().
Sets the QSerialPortInfo object to be equal to other.