Groups
Groups
Sign in
Groups
Groups
eql-user
Conversations
About
Send feedback
Help
QPixmapCache example
79 views
Skip to first unread message
Polos Ruetz
unread,
Feb 10, 2012, 7:54:16 AM
2/10/12
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to eql-user
Just wanted to share this with you:
For one of my toy projects, I needed a pixmap cache.
So why not use QPixmapCache?
I found this simple and straightforward solution:
(let ((pixmap (qnew "QPixmap")))
(defun pixmap-from-cache (file-name)
(if (qfun "QPixmapCache" "find" file-name pixmap)
pixmap
(let ((new-pixmap (qnew "QPixmap(QString)" file-name)))
(qfun "QPixmapCache" "insert" file-name new-pixmap)
new-pixmap))))
Paul
Reply all
Reply to author
Forward
0 new messages