Skip to content

PythonQt.QtCore.QTextStream · declarations 001

Back to PythonQt.QtCore.QTextStream

AlignAccountingStyle instance-attribute

AlignAccountingStyle: Any

AlignCenter instance-attribute

AlignCenter: Any

AlignLeft instance-attribute

AlignLeft: Any

AlignRight instance-attribute

AlignRight: Any

FieldAlignment instance-attribute

FieldAlignment: type

int([x]) -> integer int(x, base=10) -> integer

Convert a number or string to an integer, or return 0 if no arguments are given. If x is a number, return x.int(). For floating point numbers, this truncates towards zero.

If x is not a number or if base is given, then x must be a string, bytes, or bytearray instance representing an integer literal in the given base. The literal can be preceded by '+' or '-' and be surrounded by whitespace. The base defaults to 10. Valid bases are 0 and 2-36. Base 0 means to interpret the base from the string as an integer literal.

int('0b100', base=0) 4

FixedNotation instance-attribute

FixedNotation: Any

ForcePoint instance-attribute

ForcePoint: Any

ForceSign instance-attribute

ForceSign: Any

NumberFlag instance-attribute

NumberFlag: type

int([x]) -> integer int(x, base=10) -> integer

Convert a number or string to an integer, or return 0 if no arguments are given. If x is a number, return x.int(). For floating point numbers, this truncates towards zero.

If x is not a number or if base is given, then x must be a string, bytes, or bytearray instance representing an integer literal in the given base. The literal can be preceded by '+' or '-' and be surrounded by whitespace. The base defaults to 10. Valid bases are 0 and 2-36. Base 0 means to interpret the base from the string as an integer literal.

int('0b100', base=0) 4

NumberFlags instance-attribute

NumberFlags: type

int([x]) -> integer int(x, base=10) -> integer

Convert a number or string to an integer, or return 0 if no arguments are given. If x is a number, return x.int(). For floating point numbers, this truncates towards zero.

If x is not a number or if base is given, then x must be a string, bytes, or bytearray instance representing an integer literal in the given base. The literal can be preceded by '+' or '-' and be surrounded by whitespace. The base defaults to 10. Valid bases are 0 and 2-36. Base 0 means to interpret the base from the string as an integer literal.

int('0b100', base=0) 4

RealNumberNotation instance-attribute

RealNumberNotation: type

int([x]) -> integer int(x, base=10) -> integer

Convert a number or string to an integer, or return 0 if no arguments are given. If x is a number, return x.int(). For floating point numbers, this truncates towards zero.

If x is not a number or if base is given, then x must be a string, bytes, or bytearray instance representing an integer literal in the given base. The literal can be preceded by '+' or '-' and be surrounded by whitespace. The base defaults to 10. Valid bases are 0 and 2-36. Base 0 means to interpret the base from the string as an integer literal.

int('0b100', base=0) 4

ScientificNotation instance-attribute

ScientificNotation: Any

ShowBase instance-attribute

ShowBase: Any

SmartNotation instance-attribute

SmartNotation: Any

UppercaseBase instance-attribute

UppercaseBase: Any

UppercaseDigits instance-attribute

UppercaseDigits: Any

atEnd

atEnd() -> bool

X.atEnd() -> bool

Supplemental documentation: Qt 5 reference:

bool QTextStream::atEnd() const

Returns true if there is no more data to be read from the QTextStream; otherwise returns false. This is similar to, but not the same as calling QIODevice::atEnd(), as QTextStream also takes into account its internal Unicode buffer.

Upstream PySide2 reference signatures (binding differences may apply):

atEnd(self) -> bool

Source: https://doc.qt.io/archives/qt-5.15/qtextstream.html#atEnd

autoDetectUnicode

autoDetectUnicode() -> bool

X.autoDetectUnicode() -> bool

Supplemental documentation: Qt 5 reference:

bool QTextStream::autoDetectUnicode() const

Returns true if automatic Unicode detection is enabled, otherwise returns false. Automatic Unicode detection is enabled by default.

See also setAutoDetectUnicode(), setCodec(), and QTextCodec::codecForUtfText().

Upstream PySide2 reference signatures (binding differences may apply):

autoDetectUnicode(self) -> bool

Source: https://doc.qt.io/archives/qt-5.15/qtextstream.html#autoDetectUnicode

codec

codec() -> Any

X.codec() -> PythonQt.QtCore.QTextCodec

Supplemental documentation: Qt 5 reference:

QTextCodec *QTextStream::codec() const

Returns the codec that is current assigned to the stream.

See also setCodec(), setAutoDetectUnicode(), and locale().

Upstream PySide2 reference signatures (binding differences may apply):

codec(self) -> PySide2.QtCore.QTextCodec

Source: https://doc.qt.io/archives/qt-5.15/qtextstream.html#codec

device

device() -> Any

X.device() -> PythonQt.QtCore.QIODevice

Supplemental documentation: Qt 5 reference:

QIODevice *QTextStream::device() const

Returns the current device associated with the QTextStream, or nullptr if no device has been assigned.

See also setDevice() and string().

Upstream PySide2 reference signatures (binding differences may apply):

device(self) -> PySide2.QtCore.QIODevice

Source: https://doc.qt.io/archives/qt-5.15/qtextstream.html#device

fieldAlignment

fieldAlignment() -> Any

X.fieldAlignment()

Supplemental documentation: Qt 5 reference:

QTextStream::FieldAlignment QTextStream::fieldAlignment() const

Returns the current field alignment.

See also setFieldAlignment() and fieldWidth().

Upstream PySide2 reference signatures (binding differences may apply):

fieldAlignment(self) -> PySide2.QtCore.QTextStream.FieldAlignment

Source: https://doc.qt.io/archives/qt-5.15/qtextstream.html#fieldAlignment

fieldWidth

fieldWidth() -> int

X.fieldWidth() -> int

Supplemental documentation: Qt 5 reference:

int QTextStream::fieldWidth() const

Returns the current field width.

See also setFieldWidth().

Upstream PySide2 reference signatures (binding differences may apply):

fieldWidth(self) -> int

Source: https://doc.qt.io/archives/qt-5.15/qtextstream.html#fieldWidth

flush

flush() -> None

X.flush()

Supplemental documentation: Qt 5 reference:

void QTextStream::flush()

Flushes any buffered data waiting to be written to the device.

If QTextStream operates on a string, this function does nothing.

Upstream PySide2 reference signatures (binding differences may apply):

flush(self) -> None

Source: https://doc.qt.io/archives/qt-5.15/qtextstream.html#flush

generateByteOrderMark

generateByteOrderMark() -> bool

X.generateByteOrderMark() -> bool

Supplemental documentation: Qt 5 reference:

bool QTextStream::generateByteOrderMark() const

Returns true if QTextStream is set to generate the UTF BOM (Byte Order Mark) when using a UTF codec; otherwise returns false. UTF BOM generation is set to false by default.

See also setGenerateByteOrderMark().

Upstream PySide2 reference signatures (binding differences may apply):

generateByteOrderMark(self) -> bool

Source: https://doc.qt.io/archives/qt-5.15/qtextstream.html#generateByteOrderMark

integerBase

integerBase() -> int

X.integerBase() -> int

Supplemental documentation: Qt 5 reference:

int QTextStream::integerBase() const

Returns the current base of integers. 0 means that the base is detected when reading, or 10 (decimal) when generating numbers.

See also setIntegerBase(), QString::number(), and numberFlags().

Upstream PySide2 reference signatures (binding differences may apply):

integerBase(self) -> int

Source: https://doc.qt.io/archives/qt-5.15/qtextstream.html#integerBase

locale

locale() -> Any

X.locale() -> PythonQt.QtCore.QLocale

Supplemental documentation: Qt 5 reference:

QLocale QTextStream::locale() const

Returns the locale for this stream. The default locale is C.

This function was introduced in Qt 4.5.

See also setLocale().

Upstream PySide2 reference signatures (binding differences may apply):

locale(self) -> PySide2.QtCore.QLocale

Source: https://doc.qt.io/archives/qt-5.15/qtextstream.html#locale

numberFlags

numberFlags() -> Any

X.numberFlags()

Supplemental documentation: Qt 5 reference:

QTextStream::NumberFlags QTextStream::numberFlags() const

Returns the current number flags.

See also setNumberFlags(), integerBase(), and realNumberNotation().

Upstream PySide2 reference signatures (binding differences may apply):

numberFlags(self) -> PySide2.QtCore.QTextStream.NumberFlags

Source: https://doc.qt.io/archives/qt-5.15/qtextstream.html#numberFlags

padChar

padChar() -> str

X.padChar()

Supplemental documentation: Qt 5 reference:

QChar QTextStream::padChar() const

Returns the current pad character.

See also setPadChar() and setFieldWidth().

Upstream PySide2 reference signatures (binding differences may apply):

padChar(self) -> str

Source: https://doc.qt.io/archives/qt-5.15/qtextstream.html#padChar

pos

pos() -> int

X.pos() -> int

Supplemental documentation: Qt 5 reference:

qint64 QTextStream::pos() const

Returns the device position corresponding to the current position of the stream, or -1 if an error occurs (e.g., if there is no device or string, or if there's a device error).

Because QTextStream is buffered, this function may have to seek the device to reconstruct a valid device position. This operation can be expensive, so you may want to avoid calling this function in a tight loop.

This function was introduced in Qt 4.2.

See also seek().

Upstream PySide2 reference signatures (binding differences may apply):

pos(self) -> int

Source: https://doc.qt.io/archives/qt-5.15/qtextstream.html#pos

read

read(maxlen: int) -> str

X.read(maxlen) -> str

Supplemental documentation: Qt 5 reference:

QString QTextStream::read(qint64 maxlen)

Reads at most maxlen characters from the stream, and returns the data read as a QString.

This function was introduced in Qt 4.1.

See also readAll(), readLine(), and QIODevice::read().

Upstream PySide2 reference signatures (binding differences may apply):

read(self, maxlen: int) -> str

Source: https://doc.qt.io/archives/qt-5.15/qtextstream.html#read

readAll

readAll() -> str

X.readAll() -> str

Supplemental documentation: Qt 5 reference:

QString QTextStream::readAll()

Reads the entire content of the stream, and returns it as a QString. Avoid this function when working on large files, as it will consume a significant amount of memory.

Calling readLine() is better if you do not know how much data is available.

See also readLine().

Upstream PySide2 reference signatures (binding differences may apply):

readAll(self) -> str

Source: https://doc.qt.io/archives/qt-5.15/qtextstream.html#readAll

readByte

readByte(ch: Any) -> Any

X.readByte(ch) -> PythonQt.QtCore.QTextStream

readDouble

readDouble(f: Any) -> Any

X.readDouble(f) -> PythonQt.QtCore.QTextStream

readFloat

readFloat(f: Any) -> Any

X.readFloat(f) -> PythonQt.QtCore.QTextStream

readInt

readInt(i: Any) -> Any

X.readInt(i) -> PythonQt.QtCore.QTextStream

readLine

readLine(maxlen: int) -> str

X.readLine(maxlen) -> str

Supplemental documentation: Qt 5 reference:

QString QTextStream::readLine(qint64 maxlen \= 0)

Reads one line of text from the stream, and returns it as a QString. The maximum allowed line length is set to maxlen. If the stream contains lines longer than this, then the lines will be split after maxlen characters and returned in parts.

If maxlen is 0, the lines can be of any length.

The returned line has no trailing end-of-line characters ("\n" or "\r\n"), so calling QString::trimmed() can be unnecessary.

If the stream has read to the end of the file, readLine() will return a null QString. For strings, or for devices that support it, you can explicitly test for the end of the stream using atEnd().

See also readAll() and QIODevice::readLine().

Upstream PySide2 reference signatures (binding differences may apply):

readLine(self, maxlen: int=...) -> str

Source: https://doc.qt.io/archives/qt-5.15/qtextstream.html#readLine

readLineInto

readLineInto(line: Any, maxlen: Any) -> bool

X.readLineInto(line, maxlen) -> bool

Supplemental documentation: Qt 5 reference:

bool QTextStream::readLineInto(QString *line, qint64 maxlen \= 0)

Reads one line of text from the stream into line. If line is nullptr, the read line is not stored.

The maximum allowed line length is set to maxlen. If the stream contains lines longer than this, then the lines will be split after maxlen characters and returned in parts.

If maxlen is 0, the lines can be of any length.

The resulting line has no trailing end-of-line characters ("\n" or "\r\n"), so calling QString::trimmed() can be unnecessary.

If line has sufficient capacity for the data that is about to be read, this function may not need to allocate new memory. Because of this, it can be faster than readLine().

Returns false if the stream has read to the end of the file or an error has occurred; otherwise returns true. The contents in line before the call are discarded in any case.

This function was introduced in Qt 5.5.

See also readAll() and QIODevice::readLine().

Source: https://doc.qt.io/archives/qt-5.15/qtextstream.html#readLineInto

readLongLong

readLongLong(i: Any) -> Any

X.readLongLong(i) -> PythonQt.QtCore.QTextStream

readShort

readShort(i: Any) -> Any

X.readShort(i) -> PythonQt.QtCore.QTextStream

realNumberNotation

realNumberNotation() -> Any

X.realNumberNotation()

Supplemental documentation: Qt 5 reference:

QTextStream::RealNumberNotation QTextStream::realNumberNotation() const

Returns the current real number notation.

See also setRealNumberNotation(), realNumberPrecision(), numberFlags(), and integerBase().

Upstream PySide2 reference signatures (binding differences may apply):

realNumberNotation(self) -> PySide2.QtCore.QTextStream.RealNumberNotation

Source: https://doc.qt.io/archives/qt-5.15/qtextstream.html#realNumberNotation