Qt5 Syntax Highlighting in QML

后端 未结 5 1556
谎友^
谎友^ 2021-02-05 10:38

I am working on a QtQuick 2.0 presentation and I would like to embed some code samples. is it possible easily to create a syntax highlighting qml element.

C

5条回答
  •  长情又很酷
    2021-02-05 10:55

    Take a look at QSyntaxHighlighter.

    If you need a QML Item doing syntax highlighting, you can simply create your own by extending QDeclarativeItem and using the utility above.

提交回复
热议问题