QPainter出现异常,程序退出
一个简单的console程序,代码如下:
#include <QImage>#include <QPainter>int main(){ QImage img(400, 300, QImage::Format_RGB32); img.fill(0); QPainter pain; pain.begin(&img); pain.drawText(10,10, "abc"); pain.end(); img.save("./ttt.jpg"); return 0;}