← 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,

Am 22.07.2014 20:51, schrieb Adam Reichold:
> 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".)

As suspected, QSvgIconEngine uses QSvgRenderer internally, c.f. [1]. It
even uses the QPainter::drawPixmap(QIcon::pixmap()) idiom internally to
achieve caching. So I don't think this would solve the problem.

Best regards, Adam.

[1]
https://qt.gitorious.org/qt/qt/source/5049696cafe6eb9b75966930e5058fd98fa8d18f:src/plugins/iconengines/svgiconengine/qsvgiconengine.cpp

Best regards, Adam.

>> 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.