phantom2323
1st March 2012, 04:59
Hello all. I am creating a computerized quiz application for a tutoring center I work at, and I have two questions that I hope some of you can shed some light on:
1. I am formatting how the questions will be shown using HTML, displayed via QTextDocument/QTextEdit. I'm storing some images (30-40 KB each in size) in a SQLite DB as BLOBs, and read the data into a QImage and add this image as a resource using QTextDocument::addResource. Within the HTML code for any given question, I am using the <img> tag whose source will be the relevant resource name. When I'm done with the image, do I have to remove the resource name some how. Or are there any other considerations I need to take into account (besides deleting the QImage pointer, which I do)?
2. I would prefer to have some nicely formatted mathematical expressions shown. As I understand it, the Qt Web Kit does not support MathML (at least I couldnt get it to understand it when I did a quick test). I still need something that will work nicely with HTML, but I would prefer not to create imagse and store them in the DB like any other image I would need. Any suggestions about how I could render math expressions and insert it into the question?
Thank you for your time and consideration regarding my questions! Much appreciated :)
1. I am formatting how the questions will be shown using HTML, displayed via QTextDocument/QTextEdit. I'm storing some images (30-40 KB each in size) in a SQLite DB as BLOBs, and read the data into a QImage and add this image as a resource using QTextDocument::addResource. Within the HTML code for any given question, I am using the <img> tag whose source will be the relevant resource name. When I'm done with the image, do I have to remove the resource name some how. Or are there any other considerations I need to take into account (besides deleting the QImage pointer, which I do)?
2. I would prefer to have some nicely formatted mathematical expressions shown. As I understand it, the Qt Web Kit does not support MathML (at least I couldnt get it to understand it when I did a quick test). I still need something that will work nicely with HTML, but I would prefer not to create imagse and store them in the DB like any other image I would need. Any suggestions about how I could render math expressions and insert it into the question?
Thank you for your time and consideration regarding my questions! Much appreciated :)