Use Qt Creator's code editor in one's own Qt application?



  • Hi,

    My application relies on a code editor and I am currently using "QScintilla2":http://www.riverbankcomputing.co.uk/software/qscintilla/intro for that purpose. However, I would rather use Qt Creator's own code editor, if at all possible. I intend to check Qt Creator's source code and see what they have done in that respect, but just out of curiosity: has anyone managed to get Qt Creator's code editor to work in their Qt-based application? If so, then any hint would be most appreciated.

    With regards to QScintilla2, there is nothing wrong with it. It's just that I would rather 1) use a solution which is 100% Qt-based and 2) use a non-GPL solution (considering the nature of QScintilla2, a LGPL license would make more sense, but I appreciate that their authors would rather have you pay for it if you are not happy with a GPL license which is fair enough).

    Cheers, Alan.


  • Moderators

    Note that the C++ editor in Qt Creator is connected to the code model which in turn is feed by the different projects, ...

    Depending on what you want to archive you will need to reuse quite a bit of Qt Creator code.



  • Yep, last week I downloaded the Creator project files to take a look inside and was surprised how big and integrated it was. You will have to do a lot of "gutting" and "clamping" to get it to work, and those efforts could just as well be expended to write your own basic code editor.


  • Moderators

    ddriver: What did you expect? It is an integrated development environment, having different sets of functionality that do not interact with each other kind of goes against the very essence of the tool;-)

    DocOx: It might be simpler to just write a (couple of) plugin(s) for Qt Creator than ripping out the code editor (provided you want to keep the code completion).



  • Thanks both for your views on trying to use Qt Creator's code editor. It seems like I might just stick to QScintialla2 for the time being then.

    ddriver: if I wanted a basic code editor, I wouldn't have gone for QScintilla2 in the first place. :)

    Tobias: the editing of 'code' is only one aspect of what my software offers, so to use Qt Creator + plugins is not an option for me.


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.