From 1a39bae1bd69ad638d3f80b2eb49af6b019d28c5 2012-04-30 12:56:56 From: florianlink Date: 2012-04-30 12:56:56 Subject: [PATCH] added QImage constructor from uchar* git-svn-id: svn://svn.code.sf.net/p/pythonqt/code/trunk@216 ea8d5007-eb21-0410-b261-ccb3ea6e24a9 --- diff --git a/generator/typesystem_gui.xml b/generator/typesystem_gui.xml index cf4a8f9..414178b 100644 --- a/generator/typesystem_gui.xml +++ b/generator/typesystem_gui.xml @@ -1253,7 +1253,14 @@ - + +QImage* new_QImage( const uchar * data, int width, int height, QImage::Format format ) +{ + QImage* image = new QImage(width, height, format); + memcpy(image->bits(), data, image->byteCount()); + return image; +} +