Advertisement
Guest User

Untitled

a guest
Dec 23rd, 2019
124
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 1.02 KB | None | 0 0
  1. class Main(QtWidgets.QWidget, Ui_Form):
  2.  
  3.         x = ''
  4.  
  5.         def __init__(self, parent=None):
  6.             super(Main, self).__init__(parent)
  7.             self.setupUi(self)
  8.             self.pushButton.clicked.connect(self.subproce)
  9.             self.checkBox.stateChanged.connect(
  10.             lambda state=self.checkBox.isChecked(), no=1: self.selectBooks(state, no))
  11.        
  12.         def selectBooks(self, toggle, no):
  13.             if toggle == QtCore.Qt.Checked:
  14.                 print(''.format(toggle, no))
  15.                 if no == 1:
  16.                     print(''.format(no))
  17.                     self.x = self.lineEdit_3.text()
  18.             else:
  19.                 print(''.format(toggle, no))
  20.                 self.x = self.lineEdit_3.text()
  21.        
  22.         def subproce(self):        
  23.             x1 = self.x
  24.             file = str(self.lineEdit.text()) + '/' + str(self.lineEdit_2)
  25.             file_by = str(x1) + self.lineEdit_4.text()
  26.             subprocess.call('pyuic5' + self.file + '-x' + self.file_by)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement