您的位置:首页 > 编程语言 > Qt开发

Qt,QTableWidget的两个函数item和itemAt

2016-06-15 16:37 513 查看
坑爹的函数名称,注意看函数说明!!!

item()

QTableWidgetItem * QTableWidget::item(int row, int column) const


Returns the item for the given row and column if one has been set; otherwise returns 0.

如果要得到table中某个单元格中的item,应该用这个函数!!!

itemAt()

QTableWidgetItem * QTableWidget::itemAt(int ax, int ay) const


Returns the item at the position equivalent to QPoint(ax, ay) in the table widget’s coordinate system, or returns 0 if the specified point is not covered by an item in the table widget.

这个鬼函数。。。。

折腾了好久啊。。。哎
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: