PDA

View Full Version : copy/paste graphics from QTextEdit



jureko
10th June 2010, 08:58
Hi,
I try to copy/paste graphics from QTextEdit, but in result get (in OOWriter) only links to images (:/new/prefix1/2p.jpg).
How can I insert images not links?


p2 = new QTextEdit;
p2->show();
QTextCursor cursor(p2->textCursor());
cursor.movePosition(QTextCursor::Start);
cursor.insertText("Dane dotyczÄ…ce terenu" "\n");
QTextImageFormat imageFormat;
imageFormat.setName(":/new/prefix1/2p.jpg");
cursor.insertImage(imageFormat);