button not running function?
02:59 21 Aug 2026

i have wanted to connect these files, and while there are no errors... it is not connecting. i tried to remove the multiprocessing and it didnt do much... the button isnt running the function. why is it so?

I also have tried putting print statements in the function as well, they did not run. So there is no problem with the os header either

I really don't know how to fix this...

import multiprocessing

import sys
from PyQt5 import QtCore, QtGui, QtWidgets

import khanehconfig 
from khanehconfig import Ui_MainWindow

import multiprocessing 

b = 0
c = 0

class khane(khanehconfig.Ui_MainWindow, QtWidgets.QMainWindow):
  
    def __init__(self):
      app = QtWidgets.QApplication(sys.argv)

      QtWidgets.QMainWindow.__init__(self)
      Ui_MainWindow.__init__(self)
      self.setupUi(self)
      p1 = multiprocessing.Process(target=self.loadpezeshki)
      p2 = multiprocessing.Process(target=self.loadamuzeshi)

      self.pushButton_5.clicked.connect(loader.loadpezeshki1)
      self.pushButton_6.clicked.connect(loader.loadamuzeshi1)
     

class loader(khane):

    def __init__(self):
       
       khane.__init__(self)
    def loadpezeshki(self, event):
       os.system("python pezeshki.py")
    def loadamuzeshi(self, event):
       os.system("python amuzeshi.py")
    def loadpezeshki1(self,event):
       b = 10
       p1.start(self)
    def loadamuzeshi1(self, event):
       c = 11
       p2.start(self)
    @staticmethod 
    def joinobj():
       p1 = multiprocessing.Process(target=loader.loadpezeshki)
       p2 = multiprocessing.Process(target=loader.loadamuzeshi)
       if (c==11&b==10):

        p1.join()
        p2.join()
if __name__ == "__main__":
    ui = Ui_MainWindow()
    app = QtWidgets.QApplication(sys.argv)
    window = QtWidgets.QMainWindow()
    window.show()
    super(khane).__init__(loader)
    loader.joinobj()
    
    ui.setupUi(window)
    window.show()
    sys.exit(app.exec_())
python pyqt multiprocessing