summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHugo Parente Lima <hugo.pl@gmail.com>2011-03-28 14:51:57 -0300
committerHugo Parente Lima <hugo.pl@gmail.com>2011-03-28 14:51:57 -0300
commitf8bc57c61cfe16232a0aad8fb8eb6ae5d12ca7c9 (patch)
tree8706ef6e3ca299d725edcab86e3bbf55fd01fc2f
parent9024884495b9a19368b64c96eb75ddb117b1e5c3 (diff)
downloadpyside-f8bc57c61cfe16232a0aad8fb8eb6ae5d12ca7c9.tar.gz
pyside-f8bc57c61cfe16232a0aad8fb8eb6ae5d12ca7c9.tar.xz
pyside-f8bc57c61cfe16232a0aad8fb8eb6ae5d12ca7c9.zip
Fix doc bug 794 - "QPixmapCache.find example is wrong"
-rw-r--r--doc/codesnippets/doc/src/snippets/code/src_gui_image_qpixmapcache.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/doc/codesnippets/doc/src/snippets/code/src_gui_image_qpixmapcache.cpp b/doc/codesnippets/doc/src/snippets/code/src_gui_image_qpixmapcache.cpp
index fd9f42a..3c54d28 100644
--- a/doc/codesnippets/doc/src/snippets/code/src_gui_image_qpixmapcache.cpp
+++ b/doc/codesnippets/doc/src/snippets/code/src_gui_image_qpixmapcache.cpp
@@ -1,6 +1,6 @@
//! [0]
-pm = QPixmapCache.find("my_big_image")
-if not pm.isNull():
+pm = QPixmap()
+if not QPixmapCache.find("my_big_image", pm):
pm.load("bigimage.png")
QPixmapCache.insert("my_big_image", pm)
painter.drawPixmap(0, 0, pm)
@@ -8,8 +8,8 @@ painter.drawPixmap(0, 0, pm)
//! [1]
-pm = QPixmapCache.find("my_big_image")
-if not pm.isNull():
+pm = QPixmap()
+if not QPixmapCache.find("my_big_image", pm):
pm.load("bigimage.png")
QPixmapCache.insert("my_big_image", pm)
painter.drawPixmap(0, 0, pm)