PDA

View Full Version : Creating resource "on the fly"



Tiansen
10th May 2010, 10:45
I have JPG image stored in database. I want to use that image in QTextDocument using setHtml. So I must set path in "<IMG src=...." 2 approaches come to mind but I dont know how to implement them:

1. Somehow create that file in memory and then use it
2. Create resource in memory and then use it
I tried following:
<code>QFile *file = new QFile(":/slike/resource/glava_slo_dyn.jpg");</code>

But file.open returns -1.

I would be thankful for any suggestions.