6.0.0-rc4Source

QTextListFormat Class

The QTextListFormat class provides formatting information for lists in a QTextDocument. More…

Header#include <QTextListFormat>
CMaketarget_link_libraries(app PRIVATE Nt::Gui)
ModuleNt GUI C++ Classes
InheritsQTextFormat

List of all members, including inherited members

Public Types

enumStyle

Public Functions

QTextListFormat()
voidsetStyle(Style style)
Stylestyle() const
voidsetIndent(int indent)
intindent() 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.

ConstantDescription
QTextListFormat::ListDiscA filled circle.
QTextListFormat::ListCircleAn empty circle.
QTextListFormat::ListSquareA filled square.
QTextListFormat::ListDecimalNumbers: 1, 2, 3.
QTextListFormat::ListLowerAlphaSmall letters: a, b, c.
QTextListFormat::ListUpperAlphaCapital 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.