I'm testing the new version with the RichText. I believe the purpose of what you did is to format the rich text on the QtRPTDesigner, and QtRPT will parse variables and fields ( and [field]) from it.
I think it would be nice to send a richtext through field (replace [field] with html formatted text) since one of Qt controls are QTextEdit that can provide formatted input to reports.
Today I can't do that, because of the code for parsing for instance, and also multiple <html> tags, since QTextEdit outputs a full formated HTML text (<html> with <head> and <body>).
What do you think would be best? Make a variation of text field to receive HTML rich text, or try to improve the code to handle this problems when replacing [field] in a rich text with an input html text?
Hope I could make myself clear, if not let me know and I'll explain to you.
QtRPT is getting neat at each new version, great work! :)
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
How I understood, you want that the report received through a variable from the application formatted text (richText)? Yes, I going do it, I think it will be my next step.
Regarding how to get the richText from application...I am going to change the SIGNAL
void setValue(int &recNo, QString ¶mName, QVariant ¶mValue, int reportPage);
or add new SIGNAL with possibilites of RichText.
Also possible leave SIGNAL as it is. And process the input string (variable) as HTML string and place it to the field. So there are various options for carrying out experiments.
What do you think about above?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I think a new signal could be a good idea, not sure what options you would add.
Same signal would not be a problem either.
My main concern is about html tags, I'm working on a way to wipe them out and get only the <body> contents of QTextEdit, without using QWebKit that is a huge Qt Lib, and not worth adding only for parsing HTML. :P Trying something on QXmlStreamReader.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Have a look at QTextEdit it has limited HTML capabilities and can also be
used to render them to any qt paint device.
On Nov 17, 2014 3:00 AM, "Mauro Anjo" mauroanjo@users.sf.net wrote:
I think a new signal could be a good idea, not sure what options you would
add.
Same signal would not be a problem either.
My main concern is about html tags, I'm working on a way to wipe them out
and get only the <body> contents of QTextEdit, without using QWebKit that
is a huge Qt Lib, and not worth adding only for parsing HTML. :P Trying
something on QXmlStreamReader.
Hey Alik,
I'm testing the new version with the RichText. I believe the purpose of what you did is to format the rich text on the QtRPTDesigner, and QtRPT will parse variables and fields ( and [field]) from it.
I think it would be nice to send a richtext through field (replace [field] with html formatted text) since one of Qt controls are QTextEdit that can provide formatted input to reports.
Today I can't do that, because of the code for parsing for instance, and also multiple <html> tags, since QTextEdit outputs a full formated HTML text (<html> with <head> and <body>).
What do you think would be best? Make a variation of text field to receive HTML rich text, or try to improve the code to handle this problems when replacing [field] in a rich text with an input html text?
Hope I could make myself clear, if not let me know and I'll explain to you.
QtRPT is getting neat at each new version, great work! :)
How I understood, you want that the report received through a variable from the application formatted text (richText)? Yes, I going do it, I think it will be my next step.
Regarding how to get the richText from application...I am going to change the SIGNAL
void setValue(int &recNo, QString ¶mName, QVariant ¶mValue, int reportPage);
or add new SIGNAL with possibilites of RichText.
Also possible leave SIGNAL as it is. And process the input string (variable) as HTML string and place it to the field. So there are various options for carrying out experiments.
What do you think about above?
I think a new signal could be a good idea, not sure what options you would add.
Same signal would not be a problem either.
My main concern is about html tags, I'm working on a way to wipe them out and get only the <body> contents of QTextEdit, without using QWebKit that is a huge Qt Lib, and not worth adding only for parsing HTML. :P Trying something on QXmlStreamReader.
Have a look at QTextEdit it has limited HTML capabilities and can also be
used to render them to any qt paint device.
On Nov 17, 2014 3:00 AM, "Mauro Anjo" mauroanjo@users.sf.net wrote:
Currently we discusse not how to render the HTML text. Discussion about how correct pass rich text from user application to QtRPT in minimize size.
Yes, you are right. The wipe html and get only <body> contents is a good. Let me know if you will have a positive result.
I think this feature is ready. Files just uploaded to SVN. Please check the correctex example #12 “Report with RichText Filed”