Results 1 to 18 of 18

Thread: qtsoap

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Feb 2007
    Posts
    9
    Thanks
    3
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: qtsoap

    How Will i add Base64 encoded image into a QDomNode element

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,372
    Thanks
    3
    Thanked 5,019 Times in 4,795 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: qtsoap

    Look at the previous post. There is a code snippet there that may work.

  3. #3
    Join Date
    Mar 2006
    Posts
    140
    Thanks
    8
    Thanked 4 Times in 3 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: qtsoap

    Once you have your base64 feed it into:
    QDomText QDomDocument::createTextNode ( const QString & value )
    You'll get back a QDomText object which you can pass into .appendChild(...)

    So using the this technique, if you have a string like 'dl;kgjsdflkghlfjkghlkjf' and you call:
    Qt Code:
    1. QDomText base64Text = doc.createTextNode("dl;kgjsdflkghlfjkghlkjf");
    2. base64Elem.appendChild(base64Text );
    To copy to clipboard, switch view to plain text mode 
    You should end up with:
    Qt Code:
    1. <base64Binary>dl;kgjsdflkghlfjkghlkjf</base64Binary>
    To copy to clipboard, switch view to plain text mode 

    Wysota already showed this in his last example.
    Hopefully this will highlight the section of his example that actually sticks the base 64 string in the element.
    Last edited by stevey; 14th February 2007 at 21:56.

  4. The following user says thank you to stevey for this useful post:

    anoop (14th February 2007)

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
  •  
Qt is a trademark of The Qt Company.