Qt-solutions Archive, March 2007
Diaplying a .ppm image
Message 1 in thread
Hi,
I have problem in loading and disaplying a .ppm image.
Can someone please send me a detailed code which loads and displays
a .ppm image.I tried the following code, but it's not showing anything.
class MyWidget : public QWidget {
QPixmap pm;
public:
MyWidget()
{
pm.load("check.ppm");
}
void paintEvent(QPaintEvent * event)
{
QPainter p(this);
// p.begin(this);
p.setClipRect(event->rect());
p.drawPixmap(0,0,pm);
// p.end();
}
};
Thanks in Advance,
Mahesh.
--
[ signature omitted ]
Message 2 in thread
Hi,
> I have problem in loading and disaplying a .ppm image.
> [...]
This is a mailing list about Qt Solutions:
http://www.trolltech.com/products/qt/addon/solutions
For questions about Qt, I would suggest trying qt-interest@:
http://lists.trolltech.com/qt-interest/
--
[ signature omitted ]