sorry, it was supposed to read 'display on QGraphicsView/QGraphicsScene..
ie, gv = new QGraphicsView(this); gs = new QGraphicsScene(this); Waitman Gobble <uzi...@da3m0n8t3r.com> wrote .. > Hi, > > When I try to load a PPM into a QPixmap and display on my program dies. > > > I understand the following statement from the manual to imply that QImage and > QPixmap > support same image formats: "if no manipulation is desired, the image file can > be loaded directly into a QPixmap". I also believe the documentation suggests > that > PPM files are supported by default. > > an example ppm which kills my application: > > # file /home/waitman/pv2012/2012-06-16/shootout/DCIM/100CANON/IMG_6651.ppm > /home/waitman/pv2012/2012-06-16/shootout/DCIM/100CANON/IMG_6651.ppm: Netpbm > PPM > "rawbits" image data > > # identify /home/waitman/pv2012/2012-06-16/shootout/DCIM/100CANON/IMG_6651.ppm > /home/waitman/pv2012/2012-06-16/shootout/DCIM/100CANON/IMG_6651.ppm PPM > 3465x5202 > 3465x5202+0+0 8-bit DirectClass 54.07MB 0.133u 0:00.632 > > > code. > > path = model->filePath(index); > qDebug() << path; > > QPixmap pm(path); > statusBar()->showMessage( > tr("puf (%1) ") > .arg(pm.width()+","+pm.height())); > > gs->clear(); > gs->addPixmap(pm); > gs->setSceneRect(pm.rect()); > gv->setScene(gs); > gv->update(); > > message: > "/home/waitman/pv2012/2012-06-15/marina/DCIM/100CANON/ppm/IMG_6651.ppm" > "" > The program has unexpectedly finished. > > > > Any ideas / suggestions appreciated. > > Thanks, > > -- > Waitman Gobble > San Jose California USA -- Waitman Gobble San Jose California USA
_______________________________________________ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest