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)
  • 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 (实数 x,实数 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 不兼容变化,rowcolumn 的顺序被指定为相反的顺序。如果您依赖于modelIndex(column, row) 的顺序,您可以将环境变量QT_QUICK_TABLEVIEW_COMPAT_VERSION 设置为6.4

此方法在 Qt 6.4 中引入。


[deprecated] positionViewAtCell(int column, int row, PositionMode mode, point offset, rect subRect)

该方法已被弃用。我们强烈建议不要在新代码中使用该方法。

请使用positionViewAtIndex(index(row, column), ...) 代替。


© 2025 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.