TextSelection QML Type

Représente une sélection contiguë de texte et ses propriétés. Plus d'informations...

Import Statement: import QtQuick
Since: Qt 6.7

Propriétés

Description détaillée

TextEdit.cursorSelection représente la plage de texte actuellement sélectionnée (par exemple en faisant glisser la souris). Il peut être utilisé pour interroger et modifier le texte sélectionné, ainsi que les propriétés aux formats character et block.

Remarque : cette API est considérée comme un aperçu technique et peut être modifiée ou supprimée dans les futures versions de Qt.

Voir également TextEdit et QTextCursor.

Documentation sur les propriétés

alignment : enumeration

L'alignement du bloc contenant le texte sélectionné.

Voir également QTextBlockFormat::alignment().


color : color

La couleur d'avant-plan du texte sélectionné.

Voir également QTextCharFormat::foreground().


font : color

La police du texte sélectionné.

Voir aussi QTextCharFormat::font().


text : string

Le texte sélectionné, sans aucune marque de texte riche.

La définition de cette propriété remplace le texte sélectionné par la chaîne de caractères donnée.


© 2025 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.