On 12/21/2016 09:44 AM, Richard Duivenvoorde wrote:
On 12/20/2016 09:43 PM, Larry Shaffer wrote:
    2016-12-20 18:23 GMT+01:00 Bo Victor Thomsen
    <bo.victor.thom...@gmail.com <mailto:bo.victor.thom...@gmail.com>>:

        Hi List-members -

        Is there in Qgis a function / button / menu-item / short-cut /
        plugin to make a simple bitmap copy of the current content of
        the map-canvas and save it to the clipboard ? My users need this
        to make a copy of the map and paste into MS-Word or other
software.


While not part of the QGIS app, one could use this PyQGIS snippet to do
so (tested quickly on macOS 10.11.6 under QGIS 2.14) from the PyQGIS
console:

from PyQt4.QtGui import *
QApplication.clipboard().setImage(QImage(QPixmap.grabWidget(iface.mapCanvas())))

And for master/QGIS3 use:

from qgis.PyQt.QtWidgets import *
from qgis.PyQt.QtGui import *
QApplication.clipboard().setImage(QImage(QWidget.grab(iface.mapCanvas())))

Regards,

Richard
_______________________________________________
Qgis-user mailing list
Qgis-user@lists.osgeo.org
List info: http://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-user

Reply via email to