这个怎么显示成文本啊,总是变成超链接
self.textEdit1.setText('<a class="bri" href="//www.baidu.com/more/" name="tj_briicon" style="display: block;">更多产品</a>')
把所有的<替换成 < 把 > 替换为 >
不知道你这个问题是否已经解决, 如果还没有解决的话:因为我还没有学习数据库,所以想要保存到表格的内容只能暂时用一个文档储存起来
import os
Book = []
def saveStudents():
current_path = os.getcwd() + "\\Book.txt"
f = open(current_path, "w+")
for item in Book:
f.write(item.name + ' ' + item.books + ' ' + item.time1 + ' ' + item.time2 + '\n')
f.close()
class Books(object):
def __init__(self, name, books, time1, time2):
self.name = name
self.books = books
self.time1 = time1
self.time2 = time2