Obsolete Members for QSerialPort

The following members of class QSerialPort are obsolete. They are provided to keep old source code working. We strongly advise against using them in new code.

Public Types

enum DataErrorPolicy { SkipPolicy, PassZeroPolicy, IgnorePolicy, StopReceivingPolicy, UnknownPolicy } (obsolete)

Properties

Member Type Documentation

enum QSerialPort::DataErrorPolicy

This enum describes the policies for the received symbols while parity errors were detected.

ConstantValueDescription
QSerialPort::SkipPolicy0Skips the bad character.
QSerialPort::PassZeroPolicy1Replaces bad character to zero.
QSerialPort::IgnorePolicy2Ignores the error for a bad character.
QSerialPort::StopReceivingPolicy3Stops data reception on error.
QSerialPort::UnknownPolicy-1Unknown policy.

See also QSerialPort::dataErrorPolicy.

Property Documentation

dataErrorPolicy : DataErrorPolicy

This property holds the error policy how the process receives the character in case of parity error detection.

If the setting is successful, returns true; otherwise returns false. The default policy set is IgnorePolicy.

Note: The serial port has to be open before trying to set this property; otherwise returns false and sets the NotOpenError error code. This is a bit unusual as opposed to the regular Qt property settings of a class. However, this is a special use case since the property is set through the interaction with the kernel and hardware. Hence, the two scenarios cannot be completely compared to each other.

Access functions:

DataErrorPolicy dataErrorPolicy() const
bool setDataErrorPolicy(DataErrorPolicy policy = IgnorePolicy)

Notifier signal:

void dataErrorPolicyChanged(QSerialPort::DataErrorPolicy policy)