您可以限制QMENU的每列项目数量吗?
我正在使用Pyside2(本质上是PYQT5)进行GUI。在其中,我使用qtcore.qt.customcontextmenu
和qmenu
创建了一个右键单击弹出菜单。
添加到Qmenu的动作数(通过“ AddAction”方法)是动态的。添加足够的情况后,将在弹出菜单中创建第二列,但是第一列将占据我屏幕的整个垂直高度。
我似乎无法弄清楚如何调整它,以便每列只能在添加另一列之前有20个项目。还是有办法告诉Qmenu制作X列数量?
我是否错过了令人难以置信的显而易见的东西?
I'm working on a gui using pyside2 (essentially pyqt5). In it, I've created a right click popup menu using QtCore.Qt.CustomContextMenu
and a QMenu
.
The number of actions added to the QMenu (via the 'addAction' method) is dynamic. When enough are added, a second column gets created in the popup menu, but that first column will take up the whole vertical height of my screen.
I can't seem to figure out how to adjust it so that each column can only have, say, 20 items in it before another column is added. Or is there a way to tell the QMenu to make x amount of columns?
Am I missing something incredibly obvious...?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论