From 1a72ba260a46c3783423e121d061da93cae0c953 Mon Sep 17 00:00:00 2001 From: Stephen Johnson Date: Sun, 13 Oct 2013 21:45:44 -0700 Subject: [PATCH] Fully document PIL.ImageQt --- docs/PIL.rst | 8 -------- docs/reference/ImageQt.rst | 20 ++++++++++++++++++++ docs/reference/index.rst | 1 + 3 files changed, 21 insertions(+), 8 deletions(-) create mode 100644 docs/reference/ImageQt.rst diff --git a/docs/PIL.rst b/docs/PIL.rst index cd2252826..a4c709719 100644 --- a/docs/PIL.rst +++ b/docs/PIL.rst @@ -86,14 +86,6 @@ can be found here. :undoc-members: :show-inheritance: -:mod:`ImageQt` Module ---------------------- - -.. automodule:: PIL.ImageQt - :members: - :undoc-members: - :show-inheritance: - :mod:`ImageSequence` Module --------------------------- diff --git a/docs/reference/ImageQt.rst b/docs/reference/ImageQt.rst new file mode 100644 index 000000000..2f5cccf45 --- /dev/null +++ b/docs/reference/ImageQt.rst @@ -0,0 +1,20 @@ +.. py:module:: PIL.ImageQt +.. py:currentmodule:: PIL.ImageQt + +:py:mod:`ImageQt` Module +======================== + +The :py:mod:`ImageQt` module contains support for creating PyQt4 QImage objects +from PIL images. + +.. versionadded:: 1.1.6 + +.. py:class:: ImageQt.ImageQt(image) + + Creates an :py:class:`~PIL.ImageQt.ImageQt` object from a PIL + :py:class:`~PIL.Image.Image` object. This class is a subclass of + QtGui.QImage, which means that you can pass the resulting objects directly + to PyQt4 API functions and methods. + + This operation is currently supported for mode 1, L, P, RGB, and RGBA + images. To handle other modes, you need to convert the image first. diff --git a/docs/reference/index.rst b/docs/reference/index.rst index 8d206dbb1..925487781 100644 --- a/docs/reference/index.rst +++ b/docs/reference/index.rst @@ -17,4 +17,5 @@ Reference ImageOps ImagePalette ImagePath + ImageQt ../PIL