[Qt-interest] Segmentation fault in QPixmap::fromImage()
Cole, Derek
dcole at integrity-apps.com
Fri Apr 1 16:22:29 CEST 2011
How can I tell what type of application is it?
I think that this should work, because it does work for some images, but not others, which is the weird part
-----Original Message-----
From: Mandeep Sandhu [mailto:mandeepsandhu.chd at gmail.com]
Sent: Thu 3/31/2011 11:30 PM
To: Cole, Derek
Cc: qt-interest at qt.nokia.com
Subject: Re: [Qt-interest] Segmentation fault in QPixmap::fromImage()
On Fri, Apr 1, 2011 at 4:06 AM, Cole, Derek <dcole at integrity-apps.com> wrote:
> Hello, I am getting a segmentation fault at the last line of this snippet.
>
>
> QImage qi(lutData, imwidth,imheight, QImage::Format_Indexed8);
>
> /*...some code to call qi.setColor() to populate the LUT..*/
>
> QPixmap p(QPixmap::fromImage(qi,Qt::AutoColor));
>
> What could be the cause of this? My program just simply "unexpectedly
> finishes" and the debugger shows it down in the QPixmap lib somewhere..but I
> cant see it obviously
Is this a QApplication or a QCoreApplication? One needs an instance of
QApp to initialize the GUI subsystem.
I had a similar issue when trying to create a pixmap of data read from
a n/w interface while i was using only a QCoreApplication. Not usre if
the same applies to you.
-mandep
>
> Thanks
>
> _______________________________________________
> Qt-interest mailing list
> Qt-interest at qt.nokia.com
> http://lists.qt.nokia.com/mailman/listinfo/qt-interest
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20110401/867805eb/attachment.html
More information about the Qt-interest-old
mailing list