在哪里可以找到 Qt4 源代码编辑器小部件?

发布于 2024-09-19 15:23:31 字数 1539 浏览 0 评论 0 原文

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(5

蓝色星空 2024-09-26 15:23:31

您可以使用 QTextEditQSyntaxHighlighter 一起获得带有语法突出显示的文本编辑功能。请参阅 Qt 的 richtext\syntaxhighlighter 示例。

QtScript 和 JavaScript 一样都基于 ECMAScript 脚本语言,因此我想您可以使用 JavaScript 语法突出显示而不会出现任何大问题。因此,如果您不想从头开始编写新的 QSyntaxHighlighter 代码,也许您可​​以使用这个 JavaScript 编辑小部件

You can use QTextEdit and QSyntaxHighlighter together to get text editing features with syntax highlighting. See Qt's richtext\syntaxhighlighter example.

QtScript is based on the ECMAScript scripting language as is JavaScript, so I guess you could use JavaScript syntax highlighting without any big problems. So if you don't want to code the new QSyntaxHighlighter from scratch, maybe you could use this JavaScript editing widget.

写给空气的情书 2024-09-26 15:23:31

请参阅 QScintilla。它内置了 Javascript 突出显示和(自动)完成支持。

See QScintilla. It has Javascript highlighting and (auto-)completion support built-in.

眼泪也成诗 2024-09-26 15:23:31

尝试窃取官方的,你想要 src/editor/scripthighlighter.h和 src/editor/scripthighlighter.cpp

Try stealing the official one, you want src/editor/scripthighlighter.h and src/editor/scripthighlighter.cpp

把昨日还给我 2024-09-26 15:23:31

尝试 KDE 的 KatePart:

http://kate-editor.org/about-katepart/

引用:

KatePart 是一个快速且功能丰富的文本编辑器组件,具有许多高级功能。它实现了 KTextEditor 接口,这是 KDE 中文本编辑器组件的通用接口集合,允许在应用程序中选择它作为编辑器,让用户从不同的实现中进行选择,并且它可以使用 KTextEditor 插件。

KatePart 最初基于 KDE 1 富文本编辑器小部件的代码,但多年来几乎完全重写。它是 Kate 和 KWrite 中的默认文本编辑器小部件,也是 Konqueror 中默认显示文本的小部件。许多其他应用程序也使用它作为文本编辑组件,例如 KDevelop。

Try KatePart of KDE:

http://kate-editor.org/about-katepart/

To quote:

KatePart is a fast and feature-rich text editor component with many advanced features. It implements the KTextEditor interfaces, a common interface collection for text editor components in KDE, allowing it to be selected as the editor in applications that lets the user chose from different implementations, and it can use KTextEditor plug-ins.

KatePart is originally based on code from the KDE 1 richtext editor widget, but has been almost completely rewritten over the years. It is the default text editor widget in Kate and KWrite and also the default to display text in Konqueror. A lot of other applications use it as text editing component, too, like KDevelop.

养猫人 2024-09-26 15:23:31
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文