Answer the question
In order to leave comments, you need to log in
How to pass data to an object of another class in python?
There is a form generated by QtDesigner
class Ui_MainWindow(object):
def setupUi(self, MainWindow):
MainWindow.setObjectName("MainWindow")
...
self.textEdit_3.setObjectName("textEdit_3")
from scripts import *
class ExampleApp(QtWidgets.QMainWindow, gui.Ui_MainWindow ):
def __init__(self):
super().__init__()
self.setupUi(self)
...
def run_script_function( *args):
self.textEdit_3.setPlainText(code)
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question