Python和Qt:文本编辑器的主菜单在MacOS 10.15中不显示

2024-10-02 22:25:19 发布

您现在位置:Python中文网/ 问答频道 /正文

我正在用Python和Qt开发一个文本编辑器。 主菜单出现在Windows 10中。 主菜单显示在Ubuntu 20.04中。 MacOS 10.15中不显示主菜单

我按如下方式创建菜单:

editormenu = self.menuBar ()

出现以下错误消息:

Unable to create basic Accelerated OpenGL renderer. Unable to create basic Accelerated OpenGL renderer. Core Image is now using the software OpenGL renderer. This will be slow.

我的两个想法可能是:

  1. 在集成窗口图标时:self.setWindowIcon(QIcon(“PQT Texteditor.png”))
  2. 主内存不足,因为MacOS正在虚拟机中运行

问题: 谁知道为什么MacOs下不显示主菜单


Tags: toselfbasicubuntuwindowscreate方式菜单