Ejemplo n.º 1
0
    def shoot_screen(self, windo=0):
        screen = QGuiApplication.primaryScreen()
        window = QWindow()
        window = self.windowHandle()
        if window:
            screen = window.screen()
        if not screen:
            return

        if type(windo) in (list, tuple):
            self.original_pixmap = screen.grabWindow(
                QApplication.desktop().winId(), *windo)
        else:
            self.original_pixmap = screen.grabWindow(
                QApplication.desktop().winId(), windo)
        self.update_screenshot_label()

        # self.new_screenshot_button.setDisabled(False)
        # if self.hide_this_window_check_box.isChecked():
        self.show()
Ejemplo n.º 2
0
'''
Author: Vivienne Encarnacion
Date: September 9, 2018
'''

import sys
from PySide2.QtWidgets import QApplication
from PySide2.QtGui import QGuiApplication, QWindow
from PySide2.QtWidgets import QLabel

if __name__ == '__main__':
    app = QGuiApplication(sys.argv)
    window = QWindow()
    window.setTitle('Hello world!')
    window.show()
    sys.exit(app.exec_())