[Qgis-user] Tool to copy the content of the map canvas to the clipboard
Brent Wood
pcreso at yahoo.com
Wed Dec 21 01:01:36 PST 2016
I just save the project as image, then add the image to a document. While perhaps a few more clicks than using the clipboard, it works fine.
Cheers,
Brent
On Wednesday, December 21, 2016 9:45 PM, Richard Duivenvoorde <rdmailings at duif.net> wrote:
On 12/20/2016 09:43 PM, Larry Shaffer wrote:
> 2016-12-20 18:23 GMT+01:00 Bo Victor Thomsen
> <bo.victor.thomsen at gmail.com <mailto:bo.victor.thomsen at 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())))
>
> This avoids having to re-render the QGraphicsView (QgsMapCanvas) to a
> paint device, like an image. Code can be wrapped in a plugin, then have
> some key bindings applied (would need some more PyQt).
Tested here on Linux: working fine too!!
I think this looks like a nice (easy?) feature request to make this core
functionality?
- right-click menu on mapcanvas with:
- save Map to Clipboard
(- set size of MapCanvas to...) I know this is also often needed...
- one or two buttons to do this?
While a plugin works for older versions, I think it should not be needed
for a teacher/user to hear: install QGIS and add the following
plugins.... (while that is actually what I often have to say....)
I think I could even try to do this :-)
Regards,
Richard Duivenvoorde
_______________________________________________
Qgis-user mailing list
Qgis-user at lists.osgeo.org
List info: http://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-user
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20161221/86642675/attachment.html>
More information about the Qgis-user
mailing list