[Qt-interest] load jpg files
Yuvaraj R
yuvaraj at ongobiz.com
Tue Sep 1 15:24:44 CEST 2009
Eirik
I too faced same issue.
if we load the jpg file to resource files.. we are not able to use it .Why ?
Can u please explain us ?
Thanks
Yuvaraj Ragupathi
On Tue, Sep 1, 2009 at 1:59 PM, Eirik Ulvik <eiriku at simsurgery.com> wrote:
>
>
> RPREMANAND RPREMANAND skrev:
>
>
> Hi,
> I tried to load JPEG files in my application using
> void paintEvent(QPainterEvent * event){
> QImage *img= new QImage(tr("/images/16.jp"),Qt::Format_RGB32);
> QPixmap *pmp=new QPixmap(tr("/images/16.jpg")) ;
> QPainter p(this);
>
> p.drawPixmap(0,0,50,50,*pmp );
>
> }
> I also used img->load(tr("/images/16.jpg"))
> pmp->load(tr("/images/16.jpg"));
>
> i also did
>
> drawImage(img);
>
> Im unable to embed the resource in my application.
>
> I faced failure in all my attempts .
> Pls help in this.
>
>
> Thanks in advance,
>
> Premanand Rangasamy.
> --
> Prem
>
> ------------------------------
>
> _______________________________________________
> Qt-interest mailing listQt-interest at trolltech.comhttp://lists.trolltech.com/mailman/listinfo/qt-interest
>
> If the images are resources you should use the resurces string format eg.
> ":/images/16.jpg".
>
> Eirik
>
> _______________________________________________
> Qt-interest mailing list
> Qt-interest at trolltech.com
> http://lists.trolltech.com/mailman/listinfo/qt-interest
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20090901/5468983c/attachment.html
More information about the Qt-interest-old
mailing list