PDA

View Full Version : unknown error reading svg file



RickF
7th August 2010, 23:53
I am building user interface widgets and am using .svg files in the resource file. I have run into 1 file that QT cannot read - all the others are read fine. I'm wondering if this is a bug in the QT svg parser?

I've attached the file. All I get is "unknown error".

ChrisW67
8th August 2010, 00:50
Designer had no problem putting that SVG file on a QPushButton for me. Can you explain exactly how you are using the SVG? Post the offending code snippet?

BTW: I think you and I have read the same Inkscape buttons tutorial ;)

RickF
8th August 2010, 02:12
My bad; I was initializing the images in the constructor of a containing widget, and I guess you can't do that. I moved that code out of the constructor (like the other controls that work) and it now works.