Qt-interest Archive, December 2006
screen capture to create a thumbnail how to?
Message 1 in thread
hi,
suppose I render some opengl scene or other 2D render.
I want to offer possibility for user to create a thumbnail of this image?
is someone can give some hint of best way to do this, possible
limitations of a such behaviour?...
thank you for any info that can help me to do this,
best regards
Veronique.
PS: container of the image to be captured will be a qwidget, not a
qglwidget nor a qgfraphicsview :-(
I have no power to modify this particularity.
--
[ signature omitted ]
Message 2 in thread
Friday 01 December 2006 18:15 veronique.lefrere@xxxxxx wrote:
> hi,
>
> suppose I render some opengl scene or other 2D render.
> I want to offer possibility for user to create a thumbnail of this image?
> is someone can give some hint of best way to do this, possible
> limitations of a such behaviour?...
>
> PS: container of the image to be captured will be a qwidget, not a
> qglwidget nor a qgfraphicsview :-(
> I have no power to modify this particularity.
There are two methods on QPixmap that should suit your purpose: grabWindow or
grabWidget - which one you will use depends on whether you only want the
signle widget or if you want the full widget.
From this you get a QPixmap and then you use one of the scale methods on it to
go to the thumbnail size you want.
I hope this was what you were looking for.
Bo.
--
[ signature omitted ]