• 5489阅读
  • 3回复

【提问】求助:关于QGVectors的问题 [复制链接]

上一主题 下一主题
离线zhy0808
 

只看楼主 倒序阅读 楼主  发表于: 2006-03-16
我的程序在编译的时候没有问题,但是启动运行的时候总是输出下面的信息,QGVectors是什么类,我没有用到,请问是怎么回事
警告: QGVector::remove: Index 1008 out of range
警告: QGVector::insert: Index 1008 out of range
警告: QGVector::remove: Index 1010 out of range
警告: QGVector::insert: Index 1010 out of range
警告: QGVector::remove: Index 1012 out of range
警告: QGVector::insert: Index 1012 out of range
警告: QGVector::remove: Index 1014 out of range
警告: QGVector::insert: Index 1014 out of range
离线ediml

只看该作者 1楼 发表于: 2006-05-26
我也遇到了同样的问题
请高手指点
离线ediml

只看该作者 2楼 发表于: 2006-05-27
自问自答
要先insertRows()
离线浪漫天使
只看该作者 3楼 发表于: 2007-02-14
找到了一些相关的资料,希望能有帮助
http://lists.trolltech.com/qt-interest/2003-12/thread00092-0.html

Make sure your table has enough columns (e.g., use insertColumns).
Not taking the time to look this up in the docs, but isn't QTable's indexing
0-based?
So when adding 2 rows, you can access row 0 and row 1. Not row 2.

The insert and remove might be caused by the settext being out of range?

大概意思就是你要有足够的列去插入,如果不够,就像楼上说的,要先insertRows()。
而且当你是2行的时候,只能插到0和1行,不能插到2行
快速回复
限100 字节
 
上一个 下一个