Embedded scripting language in Qt application
-
[quote author="ZapB" date="1301566923"]It's just that QtScript now happens to use the same JS backend as WebKit. Although this is likely to be replaced with the V8 JS engine in the future.[/quote]
It will be interesting to see how V8 will do. Probably will help a lot with large script files where you need to execute a lot of actions.
-
ok. I've read some of the info in the documentation and some examples I think I made a cleat idea about how to implement this, but I have a new question.
Is there a javascript editor widget that I could implement in my application> I want to be able to change colors, show line numbers , similar to the one that Qt Creator is using??
-
thanks again Andre and ZapB. So far the best thing that I found is this post on qtcentre: http://www.qtcentre.org/threads/25501-QtScript-script-text-editor-for-Qt-4.4.3-with-Syntax-Highlighter?p=121992#post121992
I'll try and search on qt-interest mailing list . Let me know if you find something.
-
This is the "thread":http://lists.qt.nokia.com/pipermail/qt-interest/2010-November/029332.html I was thinking of. I have not tried the attached example, though it looks like it should work if you read the rest of that thread.
For some reason the thread seems to be split in the archives. Just search for "Generic Highlighter" in November 2010 to find all parts.
-
[quote author="ZapB" date="1301577716"]This is the "thread":http://lists.qt.nokia.com/pipermail/qt-interest/2010-November/029332.html I was thinking of. I have not tried the attached example, though it looks like it should work if you read the rest of that thread.
For some reason the thread seems to be split in the archives. Just search for "Generic Highlighter" in November 2010 to find all parts.[/quote]
Thanks again. I found something. It gave me a few errors. I will try later and see if I can manage to make it work. For those who are interested in the source code can be found in
@qt-creator/src/plugins/texteditor/generichighlighter@
-
2beers: You most likely want the QMLJSEditor code (in src/plugins/qmljseditor/), not the generic highlighter one... the first actually parses QML and Javascript while the latter does regexp matching only.