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

SplitPushButton setSizePolicy is not working properly #384

Open
immiProgrammer opened this issue Jul 24, 2023 · 0 comments
Open

SplitPushButton setSizePolicy is not working properly #384

immiProgrammer opened this issue Jul 24, 2023 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@immiProgrammer
Copy link
Contributor

VID_20230724_210802.mp4
from PyQt5.QtWidgets import *
from PyQt5.QtCore import *
from PyQt5.QtGui import *
import sys
from qfluentwidgets import *

class Demo(QWidget):
    def __init__(self, parent=None):
        super().__init__(parent)
        QHBoxLayout(self)
        AddCustomerSplit = SplitPushButton('Add Customer', self, FluentIcon.ADD)
        self.layout().addWidget(AddCustomerSplit)
        AddCustomerSplit.setSizePolicy(PushButton().sizePolicy())

if __name__ == '__main__':
    # enable dpi scale
    QApplication.setHighDpiScaleFactorRoundingPolicy(Qt.HighDpiScaleFactorRoundingPolicy.PassThrough)
    QApplication.setAttribute(Qt.AA_EnableHighDpiScaling)
    QApplication.setAttribute(Qt.AA_UseHighDpiPixmaps)

    app = QApplication(sys.argv)
    w = Demo()
    w.show()
    sys.exit(app.exec())
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

2 participants