On Mié 03 Nov 2010 17:34:20 usted escribió:
> Hrmm, that doesn't seem to work.  Is there any way to tell whether Qt
> is seeing the image and just not loading it?  I believe I have the
> image on the classpath correctly, but am still not seeing anything.
> I've had difficulty in the past seeing what files are on the classpath
> as it appears to be a difficult problem.  Also, I'm putting this QIcon
> into a QAction, which may or may not be a problem.  Anything special
> using QIcons with them?
Normally that should work if the image is inside your classpath. If not, you 
can use file:  and get the full path instead of classpath:

> 
> 2010/10/18 José Arcángel Salazar Delgado <[email protected]>:
> > On Lun 18 Oct 2010 16:27:43 Josh Stratton escribió:
> >> Are there any QtJambi hooks for loading a QIcon from an image inside a
> >> jar file?  In Java Swing I would pass the icon the file object to the
> >> icon, which I got from getResource, but QIcon and its respective
> >> equivalents don't take those kind of paths.  They only seem to take
> >> file paths.  Is it possible to feed them straight in somehow?  I could
> >> always just copy them to a temp dir on startup of my app, but that
> >> seems hackish if there was a way to do it already.
> > 
> > try  something like :
> > 
> > MainWindow.setWindowIcon(new QIcon(new
> > QPixmap("classpath:com/nettrace/lotecarng/gui/resources/images/azul_logo.
> > png")));
> > 
> >> Thanks, Josh
> >> _______________________________________________
> >> Qt-jambi-interest mailing list
> >> [email protected]
> >> http://lists.trolltech.com/mailman/listinfo/qt-jambi-interest
> > 
> > _______________________________________________
> > Qt-jambi-interest mailing list
> > [email protected]
> > http://lists.trolltech.com/mailman/listinfo/qt-jambi-interest

_______________________________________________
Qt-jambi-interest mailing list
[email protected]
http://lists.trolltech.com/mailman/listinfo/qt-jambi-interest

Reply via email to