Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: HorizontalFlipViewc初始化后添加图片会导致图片位置不对 #1007

Open
ShionCox opened this issue Nov 7, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@ShionCox
Copy link

ShionCox commented Nov 7, 2024

What happened?

HorizontalFlipViewc初始化后添加图片会导致图片位置不对,要点击一下切换才会正常,

Operation System

WINDOWS11

Python Version

3.11.4 64位

PyQt/PySide Version

PySide6

PyQt/PySide-Fluent-Widgets Version

1.7.0

How to Reproduce?

.

Minimum code

from qfluentwidgets import HorizontalFlipView
from PySide6.QtWidgets import QApplication, QMainWindow, QPushButton, QVBoxLayout, QWidget

class Test(QMainWindow):
    def __init__(self):
        super().__init__()
        self.view = HorizontalFlipView()
        self.view.setSpacing(20)

        self.button = QPushButton("添加图片")
        self.button.clicked.connect(self.add_images)

        layout = QVBoxLayout()
        layout.addWidget(self.view)
        layout.addWidget(self.button)

        container = QWidget()
        container.setLayout(layout)
        self.setCentralWidget(container)

    def add_images(self):
        self.view.addImages(['images/userinfo/01.jpg', 'images/userinfo/01.jpg'])

if __name__ == "__main__":
    app = QApplication([])
    test = Test()
    test.show()
    app.exec_()
@ShionCox ShionCox added the bug Something isn't working label Nov 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant