Results 1 to 2 of 2

Thread: Need help with two questions please

  1. #1

    Default Need help with two questions please

    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

  2. #2
    Join Date
    Sep 2011
    Location
    Manchester
    Posts
    538
    Thanks
    3
    Thanked 106 Times in 103 Posts
    Qt products
    Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Need help with two questions please

    Take a look at this if you haven't seen it yet, maybe it will help you.

    Also deleting the image should be ok as QTextDocument makes a copy of the resources and store them in the cache.
    The only way to clear the cahe is to call QTextDocument::clear().

Similar Threads

  1. 2 Questions
    By kingfinn in forum Qt Programming
    Replies: 4
    Last Post: 12th March 2010, 17:00
  2. New to QT and have a few questions.
    By vbman213 in forum Newbie
    Replies: 3
    Last Post: 1st February 2010, 06:50
  3. Few questions
    By ComaWhite in forum The Model-View Framework
    Replies: 4
    Last Post: 20th March 2009, 04:10
  4. Sql questions
    By Nb2Qt in forum Qt Programming
    Replies: 4
    Last Post: 15th February 2007, 22:53
  5. A few questions about Qt/Win
    By Bojan in forum Installation and Deployment
    Replies: 3
    Last Post: 16th January 2006, 09:54

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.