Obsolete Members for QQuickPaintedItem

QQuickPaintedItem 的以下成员已被弃用。提供这些成员是为了保持旧源代码的正常运行。我们强烈建议不要在新代码中使用它们。

属性

公共功能

(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())。

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