def create_new_checkbox(parent, text, checked=False): new_checkbox = QtWidgets.QCheckBox(parent) new_checkbox.setObjectName(_fromUtf8("{}".format(new_checkbox))) new_checkbox.setText(_translate("MainWindow", text, None)) new_checkbox.setChecked(checked) return new_checkbox
def add_action(parent, menu, text, command): new_action = QtWidgets.QAction(parent) new_action.setObjectName(_fromUtf8("{}".format(new_action))) menu.addAction(new_action) new_action.setText(_translate("MainWindow", text, None)) new_action.triggered.connect(lambda: command()) return new_action
def create_new_lineedit(parent): new_lineedit = QtWidgets.QLineEdit(parent) new_lineedit.setObjectName(_fromUtf8("{}".format(new_lineedit))) return new_lineedit
def create_new_horizontallayout(parent=None): new_horizontallayout = QtWidgets.QHBoxLayout(parent) new_horizontallayout.setObjectName(_fromUtf8("{}".format(new_horizontallayout))) return new_horizontallayout
def create_new_gridlayout(parent=None): new_gridlayout = QtWidgets.QGridLayout(parent) new_gridlayout.setObjectName(_fromUtf8("{}".format(new_gridlayout))) return new_gridlayout
def create_new_combobox(parent): new_combobox = QtWidgets.QComboBox(parent) new_combobox.setObjectName(_fromUtf8("{}".format(new_combobox))) return new_combobox