sedi
22nd July 2012, 17:30
Hi,
my application displays svg scaleable images. It's working wonderfully on my own system, but not on the WinXP machine I have to deploy it to.
I have done the following steps:
added QtSvg4.dll (364kB version) and QtSvgd4.dll (5.465 kB version) to the application directory
added qsvg4.dll (74kB version) and qsvgd4.dll (727 kB version) to subdir \imageformats
added qsvgicon4.dll (96kB version) and qsvgicond4.dll (828 kB version) to subdir \iconengines
-In main.cpp I've added the library paths:
int main(int argc, char *argv[])
{
QApplication app(argc, argv);
app.addLibraryPath(QDir::currentPath()+"/imageformats/");
app.addLibraryPath(QDir::currentPath()+"/iconengines/");
[--> ...open MainWindow]
}
I set up the picture this way:
bool ButtonItem::setPicture(QString fileName, QString pixPath)
{
if (fileName.isEmpty()){
this->fotoPixmapItem->setVisible(false);
return true;
}
this->fotoPixmapItem->setVisible(true);
QPixmap *pix;
pix = new QPixmap;
pix->load(pixPath + fileName);
bool erfolg = !pix->isNull();
if (erfolg){
delete this->fotoPixmap;
this->fotoPixmap=new QPixmap(*pix);
this->fotoPixmapItem->setPixmap(pix->scaledToHeight(this->bSize-(this->bSize/15),Qt::FastTransformation));
this->updateButton();
}
delete pix;
return erfolg;
}
Update:
QImageReader::supportedImageFormats();
shows svg as well as svgz - even on the target system!
Any ideas what I do wrong or miss?
my application displays svg scaleable images. It's working wonderfully on my own system, but not on the WinXP machine I have to deploy it to.
I have done the following steps:
added QtSvg4.dll (364kB version) and QtSvgd4.dll (5.465 kB version) to the application directory
added qsvg4.dll (74kB version) and qsvgd4.dll (727 kB version) to subdir \imageformats
added qsvgicon4.dll (96kB version) and qsvgicond4.dll (828 kB version) to subdir \iconengines
-In main.cpp I've added the library paths:
int main(int argc, char *argv[])
{
QApplication app(argc, argv);
app.addLibraryPath(QDir::currentPath()+"/imageformats/");
app.addLibraryPath(QDir::currentPath()+"/iconengines/");
[--> ...open MainWindow]
}
I set up the picture this way:
bool ButtonItem::setPicture(QString fileName, QString pixPath)
{
if (fileName.isEmpty()){
this->fotoPixmapItem->setVisible(false);
return true;
}
this->fotoPixmapItem->setVisible(true);
QPixmap *pix;
pix = new QPixmap;
pix->load(pixPath + fileName);
bool erfolg = !pix->isNull();
if (erfolg){
delete this->fotoPixmap;
this->fotoPixmap=new QPixmap(*pix);
this->fotoPixmapItem->setPixmap(pix->scaledToHeight(this->bSize-(this->bSize/15),Qt::FastTransformation));
this->updateButton();
}
delete pix;
return erfolg;
}
Update:
QImageReader::supportedImageFormats();
shows svg as well as svgz - even on the target system!
Any ideas what I do wrong or miss?