I want to call ZipAllEvidence function from Collect Artifacts function how can I make the function call



  • class Ui_MainWindow(object):
    def setupUi(self, MainWindow):

             self.Run.setObjectName("Run")
        
       
        def CollectArtifacts(self):
     
        def ZipAllEvidences():
    
       
    
    
       def showimages(self):
           Dialog = QtWidgets.QDialog()
         
    def retranslateUi(self, MainWindow):
    

    if name == "main":
    import sys
    app = QtWidgets.QApplication(sys.argv)
    MainWindow = QtWidgets.QMainWindow()
    ui = Ui_MainWindow()
    ui.setupUi(MainWindow)
    MainWindow.show()
    sys.exit(app.exec_())



  • By doing it ? Note your indentation is all over the place so it is a bit hard to determine within what you have defined these methods. Going with the assumption that all the methods are directly under the class here is how

    def CollectArtifacts(self):
        self.ZipAllEvidences()
    

    Methods in the same class share the same "self" indicator but if they were not in the same class (or embedded deeper under another method) then you would need to use the handle to the method via its class and/or parent method


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.