Skip to content

[Bug]: 无边框对话框打开的一瞬间会显示最大,最小,关闭按钮 #154

@runningsnai1

Description

@runningsnai1

What happened?

无边框对话框打开的一瞬间会显示最大,最小,关闭按钮,然后再消失

Operation System

windows10

Python Version

3.10.7-64bit

PyQt/PySide Version

pyside6.6.2

PyQt/PySide-Fluent-Widgets Version

1.5.3

How to Reproduce?

点击按钮,弹出无边框对话框
image

Minimum code

# coding:utf-8
import sys
from PySide6.QtWidgets import QApplication, QWidget

from qfluentwidgets import Dialog, PrimaryPushButton


class Demo(QWidget):

    def __init__(self, parent=None):
        super().__init__(parent=parent)
        self.resize(950, 500)
        self.btn = PrimaryPushButton('Click Me', parent=self)
        self.btn.move(425, 225)
        self.btn.clicked.connect(self.showDialog)
        self.setStyleSheet('Demo{background:white}')

    def showDialog(self):
        title = 'Are you sure you want to delete the folder?'
        content = """If you delete the "Music" folder from the list, the folder will no longer appear in the list, but will not be deleted."""
        w = Dialog(title, content, self)
        if w.exec():
            print('Yes button is pressed')
        else:
            print('Cancel button is pressed')


if __name__ == '__main__':
    app = QApplication(sys.argv)
    w = Demo()
    w.show()
    app.exec()

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions