我使用以下代码显示 Svgz 图像
我的代码:
QRect sSize=QApplication::desktop()->screenGeometry();
m_targetImage = QImage(sSize.width(),sSize.height(),QImage::Format_ARGB32);
...
QSvgRenderer *re = new QSvgRenderer(":/Images/Green_Curls.svgz");
QPainter pai(&m_targetImage);
re->render(&pai);
我收到以下错误:
error: C2668: 'QSvgRenderer::QSvgRenderer' : ambiguous call to overloaded function
c:\qt\qt5.0.0\5.0.0\msvc2010\include\qtsvg\qsvgrenderer.h(74): could be 'QSvgRenderer::QSvgRenderer(const QByteArray &,QObject *)'
c:\qt\qt5.0.0\5.0.0\msvc2010\include\qtsvg\qsvgrenderer.h(73): or 'QSvgRenderer::QSvgRenderer(const QString &,QObject *)'
while trying to match the argument list '(const char [26])'
我在谷歌试过,但没有运气:(如何解决这个问题?