I have a python code "example_gui.py" whose code is as below -
import sys
from PyQt5.QtWidgets import QApplication, QWidget, QLabel
from PyQt5.QtGui import QIcon
from PyQt5.QtCore import pyqtSlot
class ExampleApp(QWidget):
def __init__(self):
super().__init__()
self.initUI()
def initUI(self):
self.textLabel = QLabel(self)
self.textLabel.setText("Hello World!")
self.textLabel.move(110,85)
self.setGeometry(50,50,320,200)
self.setWindowTitle("PyQt5 Example")
self.show()
def set_text(self, text):
self.textLabel.setText(text)
if __name__ == '__main__':
app = QApplication(sys.argv)
ex = ExampleApp()
ex.set_text("Text from Python")
sys.exit(app.exec_())
I want to run this code from a rust code, and after 5 seconds, call the set_text method from the rust code it self. Can you please help me this this and give me some direction? I couldn't find a rust crate that could do this.
Thanks in advance.