[Qt-interest] problem filling a QtableWidget
Andre Somers
andre at familiesomers.nl
Wed May 26 15:25:15 CEST 2010
On 26-5-2010 15:10, mierdatutis mi wrote:
> Hi,
>
> I have a problem filling a qtablewidget. Allways fill the first row. I
> 've checked the code but I dont see any error. Could you help me
> please? Many thanks and sorry for my english!
>
> The code is:
>
> ui->tabla->setColumnCount(5);
> while ( query4.next() )
>
> {
> //QString group = query4.value( 0 ).toString();
>
> item->setText(query4.value(0).toString());
> ui->tabla->setItem(a,0,item);
> item2->setText(query4.value(1).toString());
>
> ui->tabla->setItem(a,1,item2);
> item3->setText(query4.value(2).toString());
> ui->tabla->setItem(a,2,item3);
> item4->setText(query4.value(3).toString());
>
> ui->tabla->setItem(a,3,item4);
> //QMessageBox::information(this,"",query4.value(3).toString());
> item5->setText(query4.value(4).toString());
> ui->tabla->setItem(a,4,item5);
>
> a++;
> }
>
Where is a declared and initialized?
André
More information about the Qt-interest-old
mailing list