daily pastebin goal
8%
SHARE
TWEET

Untitled

a guest Nov 8th, 2018 101 Never
Upgrade to PRO!
ENDING IN00days00hours00mins00secs
  1. class GUI(QMainWindow, form.Ui_Main_form):
  2.     def __init__(self):
  3.         super(GUI, self).__init__()
  4.         self.setAttribute(Qt.WA_DeleteOnClose)
  5.         self.setupUi(self)
  6.         self.scene = QGraphicsScene()
  7.         self.Graph.setScene(self.scene)
  8.         self.scene.clear()
  9.         self.scene.setSceneRect(0, 0, current_w, current_h)
  10.         self.imgQ = ImageQt.ImageQt(current_image)
  11.         pixMap = QPixmap.fromImage(self.imgQ)
  12.         self.scene.addPixmap(pixMap)
  13.         self.Graph.fitInView(QRectF(0, 0, current_w, current_h)), Qt.KeepAspectRatio
  14.         self.scene.update()
  15.  
  16. def main():
  17.     app = QApplication(sys.argv)
  18.     window = GUI()
  19.     window.show()
  20.     app.exec_()
  21.  
  22. if __name__ == '__main__':
  23.     main()
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top