I am trying to use qt creator and python to generate flowcharts with values. I want to save the generated flowchart as an image after, but I cannot figure out how to do it. Here is my attempt:
import sys
from PyQt5 import QtWidgets, uic
from PyQt5.QtGui import *
from mainwindow import Ui_MainWindow
class MainWindow(QtWidgets.QMainWindow, Ui_MainWindow):
def __init__(self, *args, obj=None, **kwargs):
super(MainWindow, self).__init__(*args, **kwargs)
self.setupUi(self)
app = QtWidgets.QApplication(sys.argv)
window = MainWindow()
window.show()
screen = app.primaryScreen()
screenshot = screen.grabWindow(window)
screen.save('screenshot.png', 'png')
JavaScript questions and answers, JavaScript questions pdf, JavaScript question bank, JavaScript questions and answers pdf, mcq on JavaScript pdf, JavaScript questions and solutions, JavaScript mcq Test , Interview JavaScript questions, JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)