从textEdit中读取文本框的值
#从textEdit中读取文本框的值,按行读取
def get_stock_list_from_textEdit(self):
text = self.textEdit_stock_list.toPlainText().split('\n') #用换行符拆分
logging.info(text)
codes = []
for line in text:
logging.info(line)
lineNew = line.replace(' ', '')
if len(lineNew) >0:
codes.append(lineNew)
logging.info(codes)
return codes
网友评论