Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class GUI(QMainWindow, form.Ui_Main_form):
- def __init__(self):
- super(GUI, self).__init__()
- self.setAttribute(Qt.WA_DeleteOnClose)
- self.setupUi(self)
- self.scene = QGraphicsScene()
- self.Graph.setScene(self.scene)
- self.scene.clear()
- self.scene.setSceneRect(0, 0, current_w, current_h)
- self.imgQ = ImageQt.ImageQt(current_image)
- pixMap = QPixmap.fromImage(self.imgQ)
- self.scene.addPixmap(pixMap)
- self.Graph.fitInView(QRectF(0, 0, current_w, current_h)), Qt.KeepAspectRatio
- self.scene.update()
- def main():
- app = QApplication(sys.argv)
- window = GUI()
- window.show()
- app.exec_()
- if __name__ == '__main__':
- main()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement