QTextListFormat Class
The QTextListFormat class provides formatting information for lists in a QTextDocument. More…
| Header | #include <QTextListFormat> |
|---|---|
| CMake | target_link_libraries(app PRIVATE Nt::Gui) |
| Module | Nt GUI C++ Classes |
| Inherits | QTextFormat |
List of all members, including inherited members
Public Types
| enum | Style |
Public Functions
| QTextListFormat() | |
| void | setStyle(Style style) |
| Style | style() const |
| void | setIndent(int indent) |
| int | indent() const |
Detailed Description
The format of a list says what its items are marked with and how far the list is indented.
See also QTextFormat and QTextDocument.
Differences from Qt
There are no Roman numerals and no number prefix, suffix or start value.
Member Type Documentation
enum QTextListFormat::Style
What the items of a list are marked with.
| Constant | Description |
|---|---|
QTextListFormat::ListDisc | A filled circle. |
QTextListFormat::ListCircle | An empty circle. |
QTextListFormat::ListSquare | A filled square. |
QTextListFormat::ListDecimal | Numbers: 1, 2, 3. |
QTextListFormat::ListLowerAlpha | Small letters: a, b, c. |
QTextListFormat::ListUpperAlpha | Capital letters: A, B, C. |
Member Function Documentation
QTextListFormat::QTextListFormat()
Constructs a list format without properties.
int QTextListFormat::indent() const
Returns the number of steps that the list is indented by.
void QTextListFormat::setIndent(int indent)
Sets the number of steps that the list is indented by to indent.
void QTextListFormat::setStyle(Style style)
Sets what the items of the list are marked with to style.
Style QTextListFormat::style() const
Returns what the items of the list are marked with.