Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
Allowing user to edit freely in a constrained (HTML?) template
jdxjohn last edited by
Our application wants to generate a report including values, images and free text. The customer wants to follow a fairly structured template including automated insertion of values in certain places, but also with some flexibility to edit and add text.
I'm wondering about setting up a template in HTML which describes the report structure and has special elements for auto-placing values, and using something like http://doc.qt.io/qt-5/examples-richtext.html - but in such a way the user cannot go destroying the main document structure. e.g. imagine if my report structure was a table, they could edit the cell content but not remove cells/rows (I know HTML tables aren't great, just an example).
Our use-case is medical, the application evaluates a patient's medical scan and the report includes standard (calculated) values as well as user-written summary text and notes.
They'd like to be able to see the report in a window which updates live (or semi-live) the automated values, and then save ultimately to Word/PDF. I am thinking HTML is potentially a good option because if we save as HTML, they can then just open this in Word for any final tweaks before saving as PDF that way.
Any thoughts, advice, suggestions on hoq to achieve this with Qt would be welcome. Thankyou.
Sounds a bit like you could have a widget providing the editable parts and then use something like grantlee to generate your report based on a template.