Putting in here as a result of discussion on slack.
It would be useful to have a rich text editor that supports, fonts, justification etc, so that users can write reports, save them, print them, and convert to PDF
Qt has one
http://doc.qt.io/qt-5/qtwidgets-richtext-textedit-example.html
What this does:
I am not sure how to build this in go ?
http://doc.qt.io/qt-5/qtwidgets-richtext-textedit-textedit-cpp.html
The imports at the top are basically what i also have to import in golang too ?
Then just copy the logic of what the cpp does for the events etc ?
Hey
You only need to import the core, gui and widgets module, as all classes you need are probably in those 3 modules.
I'm not sure if this editor supports markdown, but I found another markdown example here:
http://doc.qt.io/qt-5/qtwebengine-webenginewidgets-markdowneditor-example.html
Not sure, if those can be combined.
And to port this over, I would start with the main.cpp and then move further down.
The examples rely heavily on own C++ classes to implement functions, but in Go you can most of the time simply create a new instance with New* and implement the signals/slots/virtual functions at runtime with *.Connect*
Ok thanks for the tips. It really does help to know i am on the right track.
@joeblew99
I ported the textedit example, you can find it here: https://github.com/therecipe/qt/tree/master/internal/examples/widgets/textedit
that works, very impressed
@therecipe thankyou ! Will try it out..
Yeah, pretty good indication of the kind of really fast, cross-platform fun we're in for now :).
This is working well in the examples for me too.
SO closing....
Most helpful comment
@joeblew99
I ported the textedit example, you can find it here: https://github.com/therecipe/qt/tree/master/internal/examples/widgets/textedit