python - PyQt 打开另一个窗口

标签 python pyqt window

当用户单击“去工作”并隐藏当前窗口时,我向用户显示了另一个窗口。但是当我隐藏当前窗口时,任务栏中没有应用程序图标。我怎样才能做我想做的事? 我想显示新窗口并隐藏当前窗口,但任务栏中的图标没有显示。

def start(self):
        window = MainWindow(self)
        window.show()
        self.hide()

最佳答案

在 self.hide() 和 self.showMinimized() 之间切换

def start(self):
    window = MainWindow(self)
    window.show()
    self.showMinimized()

关于python - PyQt 打开另一个窗口,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49404485/

相关文章:

javascript - 将变量与 window.location.href 一起使用

c++ - 获取 Direct3D9 设备的窗口

python - 从列表中提取出发和到达

Python:如何从 Google Drive 下载整个文件夹

python - Numpy 和 Pandas 之间有性能差异吗?

python - 如何在右键单击 Qdoublespinbox 时向 QtCore.Qt.Default ContextMenu 添加操作?

python - 使用请求库的脚本在尝试从 Postgres 表提供 url 时抛出 "no connection adapters found"错误

python - 使用 PyQt4 调整对话框大小

python - 选择目录后,QtGui.QFileDialog.getExistingDirectory() 窗口不会关闭(PyQt)

winapi - Win32 opengl 窗口创建