Menu

RichText New Feature

Mauro Anjo
2014-11-14
2014-11-21
  • Mauro Anjo

    Mauro Anjo - 2014-11-14

    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! :)

     
    • aliks-os

      aliks-os - 2014-11-14

      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 &paramName, QVariant &paramValue, 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?

       
  • Mauro Anjo

    Mauro Anjo - 2014-11-17

    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.

     
    • ant32

      ant32 - 2014-11-19

      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.


      RichText New Feature
      https://sourceforge.net/p/qtrpt/discussion/general/thread/bc8cd1f7/?limit=25#e224


      Sent from sourceforge.net because you indicated interest in
      https://sourceforge.net/p/qtrpt/discussion/general/

      To unsubscribe from further messages, please visit
      https://sourceforge.net/auth/subscriptions/

       
      • aliks-os

        aliks-os - 2014-11-19

        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.

         
    • aliks-os

      aliks-os - 2014-11-19

      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.

       
  • aliks-os

    aliks-os - 2014-11-21

    I think this feature is ready. Files just uploaded to SVN. Please check the correctex example #12 “Report with RichText Filed”

     

Log in to post a comment.