[PyKDE] Displaying an image

Matthew Singer matt at finaldraftbooks.com
Sun Aug 15 21:24:46 BST 2004


I need to embed a jpg file in a dialog.  As a test was just trying something
like:

    view = QWidget()
    pixmap = QPixmap("myimage.jpg")
    view.resize(pixmap.size())
    p = QPainter(view) 
    p.drawPixmap(0,0,pixmap)
    view.show()

A window pops up, but it is empty.  What am I doing wrong?

Thanks





More information about the PyQt mailing list