Qtquick 1.1图像圆角

发布于 2025-01-24 08:24:13 字数 235 浏览 3 评论 0原文

我仅限于使用Qtquick 1.1(QT 4.8),因此无法访问图形效果库。另外,我无法使用任何C ++,因此解决方案必须是纯QML(令人沮丧的限制 - 我知道!)。

我需要能够显示带有圆角的图像,但到目前为止却无法。我尝试将图像用半径包装在剪裁的矩形内,但剪辑不起作用!还考虑过在顶部的矩形上施加边框颜色,但背景可以是梯度或图像,因此不能具有纯色边框。

这在QTQUICK 1.1(QT 4.8)中是否可以?我很感谢一些建议。

I am limited to using QtQuick 1.1 (Qt 4.8) , and so have no access to the GraphicalEffects library. Also I am not able to use any C++ and so the solution has to be pure QML (frustrating limitations - i know!).

I need to be able to display an image with rounded corners, but have so far been unable to. I have tried wrapping the image inside a clipped Rectangle with a radius but the clip doesn't work! Also thought about applying a border colour on a rectangle over the top but the background can be a gradient or image and so cannot have a solid color border.

Is this possible in QtQuick 1.1 (Qt 4.8)? I would appreciate some suggestions.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文