[Qt-interest] QPainter segmentation fault on Linux

Srdjan Todorovic todorovic.s at googlemail.com
Thu Feb 19 16:30:53 CET 2009


Hi,

2009/2/19 Davide <davide83 at gmail.com>:

>    *qImage = QImage((u8*)Image.data, Image.width, Image.height,
> QImage::Format_RGB16);

Did you *really* mean  *qImage? As in qImage is a pointer variable?

>    QPainter p;
>    p.begin(qImage);
>    p.setPen((Qt::GlobalColor)(Qt::cyan));
>    p.drawRect(2, 2, 20, 20);   //  -->   Segmentation Fault
>    p.end();

Srdjan



More information about the Qt-interest-old mailing list