Qt5加载SVG格式的图片并更颜色
QIcon MainWindow::qiconFromSvg(QString svg_path, QString color)
{
QPixmap img(svg_path);
QPainter qp(&img);
qp.setCompositionMode(QPainter::CompositionMode_SourceIn);
qp.fillRect( img.rect(), QColor(color) );
qp.end();
return QIcon(img);
}