diff options
Diffstat (limited to 'src/gui/image/qpixmap.cpp')
-rw-r--r-- | src/gui/image/qpixmap.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/gui/image/qpixmap.cpp b/src/gui/image/qpixmap.cpp index f1a06fa33c..16945edc90 100644 --- a/src/gui/image/qpixmap.cpp +++ b/src/gui/image/qpixmap.cpp @@ -1613,9 +1613,22 @@ QPixmap QPixmap::fromImageReader(QImageReader *imageReader, Qt::ImageConversionF \warning In general, grabbing an area outside the screen is not safe. This depends on the underlying window system. + \warning The function is deprecated in Qt 5.0 since there might be + platform plugins in which window system identifiers (\c WId) + are local to a screen. Use QScreen::grabWindow() instead. + \sa grabWidget(), {Screenshot Example} + \sa QScreen + \deprecated */ +QPixmap QPixmap::grabWindow(WId window, int x, int y, int w, int h) +{ + qWarning("%s is deprecated, use QScreen::grabWindow() instead." + " Defaulting to primary screen.", Q_FUNC_INFO); + return QGuiApplication::primaryScreen()->grabWindow(window, x, y, w, h); +} + /*! \internal */ |