QML / D Text Editor and Key Considerations

I am going to code a text / code editor (GUI with QML, and the rest in D *). But I have a few problems:

  • I code the GUI with QML and C ++ and then connect it using D-Backend for formatting, etc. What is the best way to connect different languages? Pipes, Sockets or D ability to use C ++ libraries?

  • IMHO imitated text is used to format text (in most cases). How can you easily edit this markup? Is the generated code similar to a background image, and the user edits opaque unformatted text?

  • Are there common methods?

* Because QML is cool, the platform is unchanged and fast. D, on the other hand, is powerful and easy to use.

+4
source share
2 answers

As you know, there is QtD , a Qt binding for D. It's not ready for production right now, but it could be a day.

Another option would be to connect C ++ and D through the C shell. This is the most commonly used way of interacting between C ++ and D.

extern(C++) interfaces are specific to the DigitalMars C ++ compiler on Windows and are very limited, so this probably won't help with your problem.

You can also watch SWIG . This is a tool that automatically generates glue code for the interaction of other languages ​​with C ++. He supports D.

If performance is not a problem, communication with the D code can work through sockets or channels.

+5
source

QML is not for WebApp. This is the QtQuick Markup Language. The "new" way to do UI in Qt. And QWidget is likely to be deprecated in favor of QML in Qt5.

I am trying to do the same. But I'm afraid that qml is not ready to do such things yet. Most of the elements available today are good enough to draw an image, a rectangle, a list, enter text on one line and jump.

I tried to achieve this by coloring the python and pigments too slowly using the html3.2 style to make it wrong. But this is the only way to style text in qml textedit .; (

QtQuick 2.0 should improve text control.

+2
source

All Articles