美文网首页
pyqt Gui 集锦

pyqt Gui 集锦

作者: 昵称违法 | 来源:发表于2019-10-25 14:42 被阅读0次

从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 

相关文章

网友评论

      本文标题:pyqt Gui 集锦

      本文链接:https://www.haomeiwen.com/subject/vovsvctx.html