Capturing screen image
Kevin Krammer
kevin.krammer at gmx.at
Sat Aug 7 14:20:35 BST 2004
On Saturday 07 August 2004 14:05, Kevin Gilbert wrote:
> Yes, its from my own program - but my KDE skills aren't that good, I'm
> still learning. So, what keywords should I search for in the documentation?
I assume you have overwritten drawContents to draw into your ScrollView.
Usually this method is called from paintEvent by the ScrollView class itself,
but you can call it as well.
You first create a QPixmap with contentsWidth() and contensHeight() as its
size.
Then you create a QPainter on this pixmap (QPixmap is a QPaintDevice).
Then you pass this painter to drawContents and use 0, 0, contentsWidth,
contentsHeight as the clipping parameters.
After drawContents returns, you QPixmap contains everything usually painted on
the widget.
Cheers,
Kevin
--
Kevin Krammer <kevin.krammer at gmx.at>
Qt/KDE Developer, Debian User
www.mrunix.de - Unix/Linux programming forum
www.qtforum.org - Qt programming forum
___________________________________________________
This message is from the kde mailing list.
Account management: https://mail.kde.org/mailman/listinfo/kde.
Archives: http://lists.kde.org/.
More info: http://www.kde.org/faq.html.
More information about the kde
mailing list