filename = ::getOpenFileName(this,
tr("选择要添加的程序"), qApp->applicationDirPath(),
tr("Excutable(*.*)"));
if(filename.isEmpty())
{
return;
}
fileInfo(filename);
seekIcon;
icon = seekIcon.icon(fileInfo);
pixmap = icon.pixmap((15, 15));
if(!pixmap.save(tr("%1.png").arg(fileInfo.baseName()), "png"))
{
qDebug() << "Save icon
failed!!";
return;
}
else
{
qDebug() << "Save icon
succeeded!!!";
}
阅读(560) | 评论(0) | 转发(0) |