PDA

View Full Version : Table Column Problem



kenny_isles
5th March 2007, 07:10
Hi All,

I am trying to create a table programmatically. So I have used this code segment to achieve this.

table1->setNumCols( 2 );

and it gives the run time error

QGVector::operator[]: Index 2 out of range
QGVector::operator[]: Index 2 out of range
Segmentation fault

Any Value Below eight gives the same error.

Why is this happening?

Some one plz help?


Regards
Kenny

jacek
5th March 2007, 23:35
table1->setNumCols( 2 );
...
QGVector::operator[]: Index 2 out of range
Your table has two columns, i.e. column "0" and column "1" --- there is no column "2".