Results 1 to 1 of 1

Thread: QTextEdit HTML Processing of Base64 Images

  1. #1
    Join Date
    Jul 2007
    Location
    NW Florida
    Posts
    16
    Thanks
    3
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Question QTextEdit HTML Processing of Base64 Images

    Qt 4.5.3 on Mac OS X Leopard
    ---

    I have a project that requires an RTF editor and have a pretty good start...loads images, text formats, etc. What I was wondering was if anyone has had any experience with loading base64 embedded images into the QTextEdit?

    Not looking for an answer....just a possible direction to look in.

    The image is correctly converted to Base64 and has been tested by opening in a web browser, as well as another RTF editor on the operating system. An example of the 'img' tag is below. I am representing the Base64 data as {BASE64_DATA} to save space.

    Qt Code:
    1. <img src="data:image/png;base64,{BASE64_DATA}">
    To copy to clipboard, switch view to plain text mode 

    We are trying to use embedded images because it would be a nice feature to have just in case someone happens to delete the original image. This way we wouldn't have to worry about it when someone pulls this record from the database.

    Just to let you see that the image does load I can send the html file that has the embedded image in there. I cannot attach it due it invalid data format.

    To view the html you can access it in the following pastebin:
    http://pastebin.mozilla.org/685727

    Any advice would be greatly appreciated and thanks in advance.

    Kevin
    Last edited by millsks; 24th November 2009 at 15:06.

Similar Threads

  1. Drag Drop Images from WebPage into QTextEdit
    By Nemo in forum Qt Programming
    Replies: 7
    Last Post: 15th December 2009, 09:35
  2. problem displaying html code in QTextEdit
    By mourad in forum Qt Programming
    Replies: 2
    Last Post: 7th September 2009, 09:25
  3. Replies: 2
    Last Post: 24th January 2009, 18:30
  4. Loading images in html in a QTextBrowser
    By BasicPoke in forum Newbie
    Replies: 1
    Last Post: 6th June 2007, 21:51
  5. [Qt 4.1]using html in QTextEdit from designer
    By patcito in forum Qt Programming
    Replies: 5
    Last Post: 16th January 2006, 22:36

Tags for this Thread

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.