QTextStreamManipulator Class
The QTextStreamManipulator class holds a deferred QTextStream setter call. More…
| Header | #include <QtCore/qtextstream.h> |
|---|---|
| CMake | target_link_libraries(app PRIVATE Nt::Core) |
| Module | Nt Core C++ Classes |
List of all members, including inherited members
Public Types
| typedef | Setter |
| typedef | CharSetter |
Public Functions
| QTextStreamManipulator(Setter m, int a) | |
| QTextStreamManipulator(CharSetter m, QChar c) | |
| void | exec(QTextStream &s) const |
Detailed Description
The objects returned by qSetFieldWidth(), qSetPadChar() and qSetRealNumberPrecision() are QTextStreamManipulator instances. Streaming one into a QTextStream with << or >> calls the stored setter on that stream.
See also QTextStream.
Differences from Qt
In Qt this class is an undocumented implementation detail. In Nt it is public, and its setters are limited to those taking an int or a QChar.
Member Type Documentation
typedef QTextStreamManipulator::CharSetter
The type of a QTextStream setter that takes a QChar.
typedef QTextStreamManipulator::Setter
The type of a QTextStream setter that takes an int.
Member Function Documentation
QTextStreamManipulator::QTextStreamManipulator(Setter m, int a)
Constructs a manipulator that calls the m setter with the integer argument a.
QTextStreamManipulator::QTextStreamManipulator(CharSetter m, QChar c)
Constructs a manipulator that calls the m setter with the character argument c.
void QTextStreamManipulator::exec(QTextStream &s) const
Calls the stored setter on the stream s.