[Qt-interest] Chicken and egg: SvgRender and Pixmap?

Jason H scorp1us at yahoo.com
Wed Jan 27 06:37:30 CET 2010


Ah, nevermind. I was using viewBox(), which was giving me (0,0,4,5) I wanted defaultSize()

But interestingly enough, I have to call painter.end() after calling renderer.render()
        painter = QPainter(pixmap)        
        renderer.render(painter)
        painter.end()
else I get the warning
QPaintDevice: Cannot destroy paint device that is being painted

It seems odd that I don't have to call begin(), but I do have to call end()...



----- Original Message ----
From: Jason H <scorp1us at yahoo.com>
To: qt-interest at trolltech.com
Sent: Wed, January 27, 2010 12:31:16 AM
Subject: [Qt-interest] Chicken and egg: SvgRender and Pixmap?

I want to load an SVG file of unknown pixel dimensions. Then I want to cache it as a pixmap.

I am getting hung up on how to specify the size of the pixmap. All the examples use a "guessed" fixed size. How do I eliminate the guessing?


      

_______________________________________________
Qt-interest mailing list
Qt-interest at trolltech.com
http://lists.trolltech.com/mailman/listinfo/qt-interest



      




More information about the Qt-interest-old mailing list