Skip to content

Instantly share code, notes, and snippets.

@jsbueno
Created January 11, 2018 15:42
Show Gist options
  • Save jsbueno/a3cd24c1907018d55e3c32d09123b93a to your computer and use it in GitHub Desktop.
Save jsbueno/a3cd24c1907018d55e3c32d09123b93a to your computer and use it in GitHub Desktop.
Screenshot with PyQt5
# This is all that is needed to take a screenshot with PyQt5
from PyQt5 import QtGui, QtWidgets
app = QtWidgets.QApplication([])
scr = app.primaryScreen()
data = scr.grabWindow(0)
data.save("blip.png")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment