What is the method? Is it virtual?
What is the method? Is it virtual?
Hi again, let's see if I explain it a bit better. I need to pass two variables (one integer and one string) to the internal Qt method which I can't change its header. I've thought declaring global variables with extern but I dont' know if it would work. Another solution could be with some internal cache of Qt (like QPixmapCache) application-wide but I don't know if it exists. Could you suggest me something, please? I don't mind if it's a "dirty" solution because it's just a temporal fix![]()
If you want a dirty solution, then simply copy and rename the whole class (or method, or a group of them) and make needed changes directly in that copy. You can then do with functions whatever you like. Just remember to call your changed version instead of Qt's aftrerwards.
Yes wysota I had thought in that solution. The problem is that the method is not directly called but there's a bit trace before: QPainter -> QPrinter -> ??? -> addImage
So make another flow. I understand you want to print to pdf and change the compression of images. First thing I would try is to download and check against snapshots of Qt4.3. As far as I know Trolltech planned to extend support for generating PDFs in Qt4.3 - maybe the part you want is already implemented.
If that fails, then make your own PDF generator based on something else. I think you just need to implement your own paint engine which you can then feed to QPainter.
Yes wysota I want to change the compression level. I will check the snapshots of Qt4.3. Thanks for the help.
Bookmarks