QTextFormat: custom properties
-
I want to attach additional management data to QTextFormat objects. This is easy enough with QTextFormat::setProperty(...). Great.
However, from the documentation (https://doc.qt.io/qt-6/qtextformat.html#Property-enum) it is not obvious which property Ids are reserved by Qt, and which ones are free to use for customizing. Is QTextFormat::UserProperty meant for that?
I suggest that you add add a block of Ids for use by the application, not to be used in future Qt versions.
-
As for Qt::UserRole your properties must be greater or equal to QTextFormat::UserProperty.
-
@Christian-Ehrlicher Thanks! That's what I expected. A clarifying sentence in the docs would be helpful.
-
@Nightrider said in QTextFormat: custom properties:
A clarifying sentence in the docs would be helpful.
As per your other threads there is no point making/nobody reading "suggestions" here, this is a user forum, for users of Qt just like yourself. If you want to make suggestions for changes in Qt (including documentation) you need to direct those to TQtC via https://bugreports.qt.io/.