def __init__(self, mainview, parent=None): super(SampleDialog, self).__init__(parent) self.ui = Ui_startDialog() self.mainview = mainview self.ui.setupUi(self) self.ui.loadFileBtn.clicked.connect(self.mainview.load_apk) self.ui.loadDeviceBtn.clicked.connect(self.load_device_action)
class SampleDialog(QtGui.QDialog): def __init__(self, mainview, parent=None): super(SampleDialog, self).__init__(parent) self.ui = Ui_startDialog() self.mainview = mainview self.ui.setupUi(self) self.ui.loadFileBtn.clicked.connect(self.mainview.load_apk) self.ui.loadDeviceBtn.clicked.connect(self.load_device_action) def load_device_action(self): try: dumpey.attached_devices() self.mainview.load_apk_from_device() except Exception: print '-'*60 traceback.print_exc(file=sys.stdout) print '-'*60 QMessageBox.warning(self, "Error", "No device has been detected. Are you sure an Android device is connected? Make sure adb is on your path.") return