it returns true but is really strange, the image is there

Originally Posted by
wysota
Did you reimplement the paint event for your widget? Does the class contain Q_OBJECT macro?
Hi Wysota yes this is the class:
class ImageRenderer
: public QWidget{
Q_OBJECT
public:
~ImageRenderer();
void setImage(IplImage*);
public slots:
QImage IplImageToQImage
(const IplImage
* iplImage
);
protected:
/* paint event */
private:
IplImage* m_frame;
/* OpenCV -> Qt */
unsigned char* m_qImageBuffer;
};
#endif //#ifndef _IMAGERENDERER_H_
class ImageRenderer : public QWidget
{
Q_OBJECT
public:
ImageRenderer(QWidget* parent=0);
~ImageRenderer();
void setImage(IplImage*);
public slots:
QImage IplImageToQImage(const IplImage* iplImage);
protected:
/* paint event */
virtual void paintEvent( QPaintEvent* event );
private:
QPixmap m_pixmap;
IplImage* m_frame;
/* OpenCV -> Qt */
QImage* m_qImage;
unsigned char* m_qImageBuffer;
};
#endif //#ifndef _IMAGERENDERER_H_
To copy to clipboard, switch view to plain text mode

Originally Posted by
Lykurg
Sure you have the uri right? what is the output of
QPixmap p
(":/resources/images/logo.jpg");
qWarning() << p.isNull();
QPixmap p(":/resources/images/logo.jpg");
qWarning() << p.isNull();
To copy to clipboard, switch view to plain text mode
Or you don't have loaded the jpeg support. Try to set a png image for testing.
I also converted to png and nothing
Bookmarks