def METHOD_NAME(parent, text_name=None, text_text=None):
    edit = QtWidgets.QLineEdit(parent)
    if text_name is not None:
        edit.setObjectName(text_name)
    if text_text is not None:
        edit.setText(text_text)
    edit.setValidator(QtGui.QIntValidator())
    edit.setMaxLength(5)
    return edit