← Back to team overview

qpdfview team mailing list archive

Re: [Question #251738]: Windows Support?

 

Question #251738 on qpdfview changed:
https://answers.launchpad.net/qpdfview/+question/251738

Adam Reichold proposed the following answer:
Hello again,

Am 22.07.2014 20:32, schrieb S. Razi Alavizadeh:
> Question #251738 on qpdfview changed:
> https://answers.launchpad.net/qpdfview/+question/251738
> 
> S. Razi Alavizadeh posted a new comment:
> Hello,
> They are available and painted as action's icon.
> And commenting out the calls to draw those icons fix the problem (also slow scrolling is fixed).
> Moreover, using QPainter::drawPixmap(QIcon::pixmap()) removes the debug outputs but nothing is painted (maybe iconRect should be modified?)

If you QIcon::pixmap() for an SVG-only icon, this should just create a
painter itself and draw to it. Hence you might not see the debug output
of the main painter, but the results should be identical.

> But I think you should use QSvgRenderer, it works but it needs the
filenames.

I am not sure where the difference to using QIcon is and I suspect it
uses QSvgRenderer internally. In any case, I do want to draw the
platform-supplied icons which often are pixmaps and I use the SVG icons
as fallbacks only.

I'll look at the Qt source code what QIcon actually uses to draw onto a
QPainter. Have you tried to use QSvgRenderer directly? (Maybe using a
resource path like ":/icons/image-loading.svg".)

> Best Regards,
> Razi
> 

Best regards, Adam.

-- 
You received this question notification because you are a member of
qpdfview, which is an answer contact for qpdfview.