Open yokuminto opened 3 days ago
解决不了,这个是被视口挡住了
解决不了,这个是被视口挡住了
可以通过蒙版解决吗?刚刚看到一个可能解决的方案:https://blog.csdn.net/away_1997/article/details/122740762
解决不了,这个是被视口挡住了
可以通过蒙版解决吗?刚刚看到一个可能解决的方案:https://blog.csdn.net/away_1997/article/details/122740762
我实现了一个生效的示例,能够正常运行,不过存在一些锯齿(就效果来说目前够用了)
# 创建 flipView
self.flipView = HorizontalFlipView(self)
self.flipView.addImages(self.banners)
self.flipView.setAspectRatioMode(Qt.AspectRatioMode.KeepAspectRatio)
self.flipView.setItemSize(QSize(345, 160))
self.flipView.setFixedSize(QSize(345, 160))
self.flipView.itemClicked.connect(self.open_banner_link)
# 实现遮罩
path = QPainterPath()
path.addRoundedRect(self.flipView.rect(), 10, 10, Qt.SizeMode.AbsoluteSize)
region = QRegion(path.toFillPolygon().toPolygon())
self.flipView.setMask(region)
self.mainLayout.addWidget(self.flipView)
我觉得这个可能不算是个 bug
What happened?
设置圆角后,只有停止动画时才是圆角 以及,如果这样子写的话,flipView会把卡片的圆角也占据了.不知道有没有好的写法
Operation System
Windows11 23H2
Python Version
3.10.9
PyQt/PySide Version
pyside6==6.7.2
PyQt/PySide-Fluent-Widgets Version
PySide6-Fluent-Widgets==1.6.6
How to Reproduce?
猜想:可能是动画过程中是单纯的平移,而圆角实际上是绘制图片时设置的 期望:全程动画保持圆角 这是最小示例的演示效果
新的演示效果
Minimum code