有什么方法可以最小化和最大化在 QT Designer 和 PyCharm 中制作的 GUI 及其内容?

问题描述

大家好,我正在做一个项目,使用 PyCharm 和 QT Designer 作为设计和构建图形用户界面 (GUI) 的工具,单击 GUI 右上角的最大化和最小化按钮/选项卡后,窗口将最大化和最小化但内容,GUI 中的表单本身将是相同的,我尝试将 QT Designer 中的 sizePolicy 调整为扩展,但它不起作用。 有没有办法最大化和最小化其内容

 def restoreOrMaximizeWindow(self):  # Restore or maximize your window
    # Global windows state
    global WINDOW_SIZE  # The default value is zero to show that the size is not maximized
    win_status = WINDOW_SIZE
    if win_status == 1:  # If the window is not maximized
        WINDOW_SIZE = 0  # Update value to show that the window has been maxmized
        self.showMaximized()
    else:
        # If the window is on its default size
        WINDOW_SIZE = 0  # Update value to show that the window has been minimized/set to normal size (which is 800 by 400)
        self.shownormal()  # Update button icon when window is minimized

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)