Where is the file located? Are you trying to load it from the classpath with "classpath:"? I don't have any problems loading a pixmap from the filesystem of out of a jar file on the classpath. But loading it directly from the classpath (not in a jar-file) doesn't work for me.
/Dimitri "Tomasz 'Trog' Welman" <[EMAIL PROTECTED]> wrote: > On Fri, 14 Mar 2008, Dawid Sip wrote: > >> Hi, >> I cant seem to find any good snippets for QT Jambi, otherwise I wouldnt >> probably have to ask this, but i have problems with simple things like >> to show an image in some QObject instance like QLabel. The examples and >> demos are not entirely documented so i also cant find answers there. >> >> What I want is to show an image which i open using string provided by >> the OpenFile dialog. >> This: >> "ui.label.setPixmap(QPixmap.grabWindow(QApplication.desktop().winId()));" >> works ok and i get a screenshot in the labels place, >> >> but this: "ui.label.setPixmap(new QPixmap(fileName));" >> wont show anything. >> > This works for me (Gentoo Linux 32bit, QtJambi 4.3.3_01). > Are You 100% sure the "fileName" exists? > Have You been trying to print the fileName value to i.e. stdout? > > > _______________________________________________ Qt-jambi-interest mailing list [email protected] http://lists.trolltech.com/mailman/listinfo/qt-jambi-interest
