Hi Axel, Axel Jäger wrote: > Hi, > I'm doing an application that is primarily a script application. Thus > I provide a text editor and some docks around to show my special > QObject that gets manipulated through the users scripts. When I saw > the screenshots of QScriptDebugger in the docs I was happy to maybe > save the time to implement both syntax hightlighting and a fancy > editor widget. > > Unfortunately I see no way to use QScriptDebuggers code widget as > primary text editor in my application. I can understand that maybe > breakpoints and stuff talk to the debugger or for whatever reason the > code editor is private. It also still has some bugs (see my mail ten > minutes ago). But the syntaxhighlighter could be public API because > nokia/Qt-software defines the QScript language so it makes a lot of > sense that Qt-software also provides the syntax highlighter. The same > is valid for the syntax highlighter of Qt Stylesheets used in the > stylesheet editor of Qt Designer. > > It also makes a lot of sense to give the user the same editor widget > for both editing AND debugging code. Otherwise the user of an > application will be pissed of while editing and code and looks forward > to the happy time when he can debug and is allowed to use the cool > editor. The other option would be to make a better editor widget than > the one provided by the debugger so the user will be punished with a > worse editor when using the debugger. > > Sounds like an odd idea. > > I know that I could just copy both QScriptEdit and > QScriptSyntaxHighlighter into my own application but we all know that > this is a bad idea. Anyway I did so for the moment and it works > surprisingly well. > > So I'd have a solution but I want to give you valuable feedback from > the user and what I think about your API :) > > Best regards, > Axel >
Thanks for the feedback. You're right, it's a shame that the syntax highlighter and editor are not in the public API; however, we did not want to commit them as public at this point. The syntaxhighlighter could arguably have been added with ease (and without much risk that the API would change), but the feature set for 4.5 is frozen now, so it will go into 4.6 at the earliest. We want to extend the API to enable the sort of IDE integration that you're looking for, but it was outside the scope of the 4.5 release. Best regards, Kent _______________________________________________ Qt4-preview-feedback mailing list [email protected] http://lists.trolltech.com/mailman/listinfo/qt4-preview-feedback
