[Interest] Macro support with QTextEdit.

william.crocker at analog.com william.crocker at analog.com
Sat Jan 9 01:21:59 CET 2016


On 01/08/2016 05:40 PM, Bill Crocker wrote:
> Hello:
>
> I am working on a WYSIWYG editor.
> The user needs to be able to enter macros which render
> specially on the screen. For the purpose of this conversation,
> pretend they enter "$DATE" which displays as "8-JAN" on the screen.
> They are not allowed to edit the "8-JAN" directly. If they act to
> edit the "8-JAN", a widow would pop up where they can edit the "$DATE".
> If they changed it to "$YEAR", "2016" would appear in the screen when
> they are done. These macros would be interspersed with regular text.
>
> How do I this using a QTextEdit widget in HTML mode
> with QTextCursor etc.
>

Okay. I have made some progress using the QTextObjectInterface.
Next series of questions:

- If a QTextCursor spans one of my inline objects and some aspect of the
   font is changed, how does my object get notified.

- My object is basically a piece of text. How do I render it on
   the same base line as neighboring text.

Thanks.

Bill

> Thanks.
>
> Bill
> _______________________________________________
> Interest mailing list
> Interest at qt-project.org
> http://lists.qt-project.org/mailman/listinfo/interest
>
>



More information about the Interest mailing list