admin管理员组文章数量:1431154
I am creating a window with PyQt6 for which I set an icon.
It shows on the top left of the window and the task bar for the main window, but not on my second and third screen.
It works the same when I execute my script as well as running it from the exe. I convert the script to.
This is the code I use to set the icon:
class MainWindow(QtWidgets.QMainWindow):
def __init__(self):
super().__init__()
uic.loadUi(os.path.join(os.path.dirname(__file__), "DesignMainWindow.ui"), self)
self.setWindowTitle("My title")
icon_path = os.path.join(os.path.dirname(__file__), "icon.png")
self.setWindowIcon(QtGui.QIcon(icon_path))
Python 3.9.7 PyQt6==6.7.1 # Versions
版权声明:本文标题:pyqt6 - Python window is not showing the task bar icon on all screens (only on the main one) - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1745557560a2663276.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论