gibi70
4th February 2013, 23:55
Hello, I am using some QGraphicsTextItem that need to embed inside of it "special" tags. These tags should be parsed and postprocessed, and the real displayed text should change in response to some action (the idea is the same of Word "fields").
I am currently using the <a> tag with some special URL in its href attribute, which can be easily parsed and identified, and the text surrounded by <a> and </a> gets updated. I have devised this so far since the user might want to modify, save, and reload the text, and the special field must be kept. Just to finish with an example:
<a href="date">***</a>
after postprocessing becomes
<a href="date">2013/02/04</a>
I am kindly asking you here if there is a less cumbersome method to carry this task out, any idea is welcome, thank you.
I am currently using the <a> tag with some special URL in its href attribute, which can be easily parsed and identified, and the text surrounded by <a> and </a> gets updated. I have devised this so far since the user might want to modify, save, and reload the text, and the special field must be kept. Just to finish with an example:
<a href="date">***</a>
after postprocessing becomes
<a href="date">2013/02/04</a>
I am kindly asking you here if there is a less cumbersome method to carry this task out, any idea is welcome, thank you.