Obsolete Members for TableView
QML 类型TableView的以下成员已被废弃。提供这些成员是为了确保旧源代码能够继续运行。我们强烈建议不要在新代码中使用它们。
方法
- Point cellAtPos(point position, bool includeSpacing)
(deprecated) - Point cellAtPos(real x, real y, bool includeSpacing)
(deprecated) - Item itemAtCell(int column, int row)
(deprecated) - QModelIndex modelIndex(int row, int column)
(since 6.4, deprecated) - void positionViewAtCell(int column, int row, PositionMode mode, point offset, rect subRect)
(deprecated)
方法文档
[deprecated] Point cellAtPos(point position, bool includeSpacing)
此方法已弃用。我们强烈建议不要在新代码中使用它。
请改用cellAtPosition (点位置)。
[deprecated] Point cellAtPos(real x, real y, bool includeSpacing)
此方法已弃用。我们强烈建议不要在新代码中使用它。
请改用cellAtPosition(real x, real y)。
[deprecated] Item itemAtCell(int column, int row)
此方法已弃用。我们强烈建议不要在新代码中使用它。
请改用itemAtIndex(index(row, column))。
[since 6.4, deprecated] QModelIndex modelIndex(int row, int column)
此方法已弃用。我们强烈建议不要在新代码中使用它。
请改用index(int row, int column)。
注意:由于 Qt 6.4.0 与 Qt 6.4.2 之间存在 API 不兼容的变更,row 和column 的顺序被指定为相反的顺序。如果您依赖于modelIndex(column, row) 的顺序,可以将环境变量QT_QUICK_TABLEVIEW_COMPAT_VERSION 设置为6.4
此方法是在 Qt 6.4 中引入的。
[deprecated] void positionViewAtCell(int column, int row, PositionMode mode, point offset, rect subRect)
此方法已弃用。我们强烈建议不要在新代码中使用它。
请改用 `positionViewAtIndex(index(行, 列), ...)`。
© 2026 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.