Hello, the icons do not appear anymore using qt jambi 4.4 preview. In the following program, I see the following text printed on system.out: bmp gif jpeg jpg mng pbm pgm png ppm tif tiff xbm xpm
and I see the push button without any icon: it is all grey. I attach the png icon I want to display. I have checked and the "images/iconshock/48/file_48.png" is definitely in the classpath...
here is my sample code:
import java.util.List;
import com.trolltech.qt.core.QByteArray;
import com.trolltech.qt.gui.QApplication;
import com.trolltech.qt.gui.QIcon;
import com.trolltech.qt.gui.QImageReader;
import com.trolltech.qt.gui.QPushButton;
public class Test {
public static void main(String[] args) {
QApplication.initialize(args);
showSupportedImageFormats();
QPushButton but = new QPushButton();
but.resize(50,50);
but.setIcon(new QIcon("classpath:images/iconshock/48/file_48.png"));
but.show();
QApplication.exec();
}
public static void showSupportedImageFormats() {
final List<QByteArray> QtAcceleratedImageFormats =
QImageReader.supportedImageFormats();
for (int i = 0; i < QtAcceleratedImageFormats.size(); ++i) {
System.out.println(QtAcceleratedImageFormats.get(i).toString());
}
}
}
<<inline: file_48.png>>
_______________________________________________ Qt-jambi-interest mailing list [email protected] http://lists.trolltech.com/mailman/listinfo/qt-jambi-interest
