[Pygui] QTableWidget - add from my files to table
馬吉軍
jjmmma at gmail.com
Fri Jan 20 09:55:03 CET 2012
Hi,
Will this piece of code work for you?
f = open('test.txt','r')
lines = [];
for line in f:
lines.append(line)
table = QTableWidget(5,7)
for i,j in zip(lines,range(len(lines))):
item = QTableWidgetItem(i)
table.setItem(1,j,item)
BRs, Kimi
顺颂时祺
<http://www.chachafille.com>
On Fri, Jan 20, 2012 at 9:19 AM, Dodi Ara <dodi.ara at gmail.com> wrote:
> i wondering, how can i add from my files to table widget?
>
>
>
> for example, i have one file
>
> $ cat a
> tes
> $
>
> so, the "test" fill in the one or more row or columns
>
> any help will be appreciate
> _______________________________________________
> Pygui mailing list
> Pygui at python.org
> http://mail.python.org/mailman/listinfo/pygui
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/pygui/attachments/20120120/2b59d196/attachment.html>
More information about the Pygui
mailing list