Thanks for the answer.
Now I have everything in a QByteArray. Now, I am parsing my QByteArray which has XML format. The parsing is done with DOM.
I need an element of the XML (QByteArray) to be comverted or used as QByteArray.
How ?
I do not want to transform the element to string, because I think I will loose the picture.
void Message
:: parseScreenshot(QByteArray incomingMessage
) {
doc.setContent(incomingMessage);
n = n.nextSibling();
QByteArray screenshot
= e
// to QByteArray. what should be here ? chatGui->screenshot(screenshot);
}
void Message :: parseScreenshot(QByteArray incomingMessage)
{
QDomDocument doc("messageIn");
doc.setContent(incomingMessage);
QDomElement docElem = doc.documentElement();
QDomNode n = docElem.firstChild();
n = n.nextSibling();
QDomElement e = n.toElement();
QByteArray screenshot = e // to QByteArray. what should be here ?
chatGui->screenshot(screenshot);
}
To copy to clipboard, switch view to plain text mode
Bookmarks