Trolltech Home | Qt-interest Home | Recent Threads | All Threads | Author | Date
All threads index page 2

Qt-interest Archive, September 2007
PyLab plot


Message 1 in thread

Hi dear all,
   
  Does anybody know how we can have(convert) the Pylab plot (image) in\to QImage or QPixmap format?
   
  Thank you in advance

 Send instant messages to your online friends http://uk.messenger.yahoo.com 

Message 2 in thread

Hi,

> Does anybody know how we can have(convert) the Pylab plot (image) in\to 
> QImage or QPixmap format?

You could save a Pylab plot into a file and load the file into a QImage or 
QPixmap. Use a format understood by both toolkits, such as PNG.

If you require no file is used in the process, try saving the Pylab plot 
directly into a memory buffer, but still using an image file format such as 
PNG. Then use QImage::fromData():
	http://doc.trolltech.com/4.3/qimage.html#fromData

--
 [ signature omitted ]