6.0.0-rc4Source

QIODeviceBase Class

The QIODeviceBase class provides the open mode flags shared by I/O devices. More…

Header#include <QIODeviceBase>
CMaketarget_link_libraries(app PRIVATE Nt::Core)
ModuleNt Core C++ Classes
Inherited byQIODevice

List of all members, including inherited members

Public Types

enumOpenModeFlag
typedefOpenMode

Detailed Description

QIODeviceBase is the base class of QIODevice. It holds the OpenModeFlag enum and the OpenMode flags type, so that they can be named through any device class, for example as QFile::ReadOnly.

See also QIODevice.

Differences from Qt

QIODeviceBase has no other members.

Member Type Documentation

typedef QIODeviceBase::OpenMode

The OpenMode type is a typedef for QFlags<OpenModeFlag>. It stores an OR combination of OpenModeFlag values.

enum QIODeviceBase::OpenModeFlag

Describes how a device is opened. The OpenMode type is a typedef for QFlags<OpenModeFlag>.

ConstantDescription
QIODeviceBase::NotOpenThe device is not open.
QIODeviceBase::ReadOnlyThe device is open for reading.
QIODeviceBase::WriteOnlyThe device is open for writing. Note that this mode implies Truncate for files unless Append or ReadOnly is also given.
QIODeviceBase::ReadWriteThe device is open for reading and writing.
QIODeviceBase::AppendThe device is opened in append mode, so that all data is written to the end of the file. Implies WriteOnly for files.
QIODeviceBase::TruncateIf possible, the device is truncated before it is opened. All earlier contents are lost. Implies WriteOnly for files.
QIODeviceBase::TextMarks the device as a text device. QFile does not translate line endings.
QIODeviceBase::UnbufferedAccepted for compatibility; devices in Nt do not change their behavior.
QIODeviceBase::NewOnlyFail if the file to be opened already exists. Create and open the file only if it does not exist.
QIODeviceBase::ExistingOnlyFail if the file to be opened does not exist.