Obsolete Members for QQuickPaintedItem
QQuickPaintedItem 类的以下成员已被废弃。提供这些成员是为了确保旧源代码能够继续运行。我们强烈建议在新代码中不要使用它们。
属性
(deprecated)contentsScale : qreal(deprecated)contentsSize : QSize
公共函数
(deprecated) QRectF | contentsBoundingRect() const |
(deprecated) qreal | contentsScale() const |
(deprecated) QSize | contentsSize() const |
(deprecated) void | resetContentsSize() |
(deprecated) void | setContentsScale(qreal) |
(deprecated) void | setContentsSize(const QSize &) |
信号
(deprecated) void | contentsScaleChanged() |
(deprecated) void | contentsSizeChanged() |
属性文档
[deprecated] contentsScale : qreal
此枚举已弃用。我们强烈建议不要在新代码中使用它。
用于缩放内容的过时方法。
此函数仅为兼容性而提供,请结合使用 `size()` 和 `textureSize()` 来确定绘制内容的大小。
访问函数:
| qreal | contentsScale() const |
| void | setContentsScale(qreal) |
通知信号:
| void | contentsScaleChanged() |
另请参阅 width()、height() 和textureSize()。
[deprecated] contentsSize : QSize
此枚举已弃用。我们强烈建议不要在新代码中使用它。
用于设置内容大小的过时方法。
此函数仅为兼容性而提供,请结合使用 `size` 与 `textureSize ` 来确定绘制对象的大小。
访问函数:
| QSize | contentsSize() const |
| void | setContentsSize(const QSize &) |
通知信号:
| void | contentsSizeChanged() |
另请参阅 width()、height() 和textureSize()。
成员函数文档
[deprecated] QRectF QQuickPaintedItem::contentsBoundingRect() const
此函数已弃用。我们强烈建议在新代码中不要使用它。
提供此函数仅出于兼容性考虑,请将 `size` 与 `textureSize ` 结合使用,以确定要绘制内容的大小。
另请参阅 width()、height() 和textureSize()。
[deprecated] void QQuickPaintedItem::resetContentsSize()
此函数已弃用。我们强烈建议不要在新代码中使用它。
此便捷函数相当于调用setContentsSize (QSize())。
© 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.