如何在qgridlayout或类似的小部件中格式化我的数据?

时间:2014-01-17 13:11:22

标签: python user-interface widget pyqt4

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)

此时代表我的数据,数据被打印到标签(l124)并通过一行打印。我希望qgrid将我的数据表示在按行和列组织的某种表中。

0 个答案:

没有答案