From 0c5809474bf157d020ebd94aa903b3faccae4a6a Mon Sep 17 00:00:00 2001 From: Renato Filho Date: Wed, 13 Apr 2011 18:27:09 -0300 Subject: Implemented function QBitmap.fromData. Fixes bug #740 Reviewer: Marcelo Lira Hugo Parente Lima --- PySide/QtGui/typesystem_gui_common.xml | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'PySide') diff --git a/PySide/QtGui/typesystem_gui_common.xml b/PySide/QtGui/typesystem_gui_common.xml index 70d3c7d7b..d06502f60 100644 --- a/PySide/QtGui/typesystem_gui_common.xml +++ b/PySide/QtGui/typesystem_gui_common.xml @@ -378,8 +378,17 @@ - - + + + + + + const void* buffer; + Py_ssize_t size; + if (PyObject_AsReadBuffer(%PYARG_2, &buffer, &size) != -1) + %PYARG_0 = %CONVERTTOPYTHON[QBitmap](QBitmap::fromData(%1, (const uchar*)buffer, %3)); + + -- cgit v1.2.3