Created
January 11, 2018 15:42
-
-
Save jsbueno/a3cd24c1907018d55e3c32d09123b93a to your computer and use it in GitHub Desktop.
Screenshot with PyQt5
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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