[Qt-interest] drawing to an off-screen buffer with QPainter/QImage without a QApplication?
Paul Miller
paul at fxtech.com
Wed Jan 6 15:27:45 CET 2010
On 1/5/2010 9:33 AM, Jason H wrote:
> You still have to use the GUI library, but you don't need to make a window.
>
> The thing to try is to try to derive from QCoreApplication. But I don't think that will work because it doesn't provide any painters. But, you don't need any painters QApplication would provide (since you're writing to file, you need to set the color depth and other device metrics yourself when you cerate the durface (QImage/QPixmap) ). If QCoreApplication won't work, then just do what you said, and make a QApplication but just don't show() any dialogs. I also think this will have the side effect of giving you a command prompt immediately.
Yeah, seems to work with making a QCoreApplication. At least on Windows.
More information about the Qt-interest-old
mailing list