Python 如何在qgridlayout或类似的小部件中格式化数据?
这就是目前表示我的数据的内容,数据被打印到标签(l124)中,并通过一行打印。我希望qgrid将我的数据表示在一个按行和列组织的某种表格中Python 如何在qgridlayout或类似的小部件中格式化数据?,python,user-interface,widget,pyqt4,Python,User Interface,Widget,Pyqt4,这就是目前表示我的数据的内容,数据被打印到标签(l124)中,并通过一行打印。我希望qgrid将我的数据表示在一个按行和列组织的某种表格中 def view(self): sender=self.sender() self.statusBar().showMessage(sender.text()+' was pressed.') with sqlite3.connect('drycleaning_shop.db') as db: cursor=db.cu
def view(self):
sender=self.sender()
self.statusBar().showMessage(sender.text()+' was pressed.')
with sqlite3.connect('drycleaning_shop.db') as db:
cursor=db.cursor()
cursor.execute('select* from Item Order BY Name ASC')
product=cursor.fetchall()
product=str(product)
print(len(product))
self.l.setText(str(product))
self.l124.setText(view2)