model中的index()函数

来源:互联网 发布:win7精仿mac系统下载 编辑:程序博客网 时间:2024/05/22 13:16
        QModelIndex  TradeTableModel::index ( int row, int column, const QModelIndex & parent/* = QModelIndex() */) const
        {
            if (row < 0 || column < 0)
            {
                return QModelIndex();
            }
            return createIndex(row, column);//创建当前row和column处item的QModelIndex

        }


//根据行列,返回相应的QModelIndex,

0 0