|
|
Can I assume you are doing something like this to display it?
void MyWidget::paintEvent(QPaintEvent*)
{
QPicture picture;
QPainter painter(this);
picture.load("drawing.pic"); // load picture
painter.drawPicture(0, 0, picture); // draw the picture at (0,0)
}
Or are you trying to load it in another application somewhere? This creates
a Qt specific format file.
Keith
On 03-21-2007 11:36 AM, "Lingfa Yang" wrote:
> Does anyone know why paint in picture does not work?
>
> QPicture picture;
> QPainter painter;
> painter.begin(&picture); // paint in picture
>
> painter.drawEllipse(0,0, 512, 320); // draw an ellipse
>
> painter.end(); // painting done
>
> bool ok = picture.save("drawing.pic"); // save picture
>
> Though ok is true, and the pic file is created, but it seems NOT a valid
> pic file. Why?
> I use Qt4.1.1 in windows
>
> Lingfa
--
To unsubscribe - send a mail to qt-interest-request@xxxxxxxxxxxxx with
"unsubscribe" in the subject or the body.
List archive and information: http://lists.trolltech.com/qt-interest/
|
|