Skip to content

Breaking change related to QMenu in 2.4.2 #505

@astrofrog

Description

@astrofrog

Prior to QtPy 2.4.2, the following:

from qtpy.QtWidgets import QApplication, QMenu

app = QApplication([])

menu = QMenu()
menu.addMenu('test')

submenu = menu.children()[1]

print(isinstance(submenu, QMenu))

would return True, but now returns False because the class for menus added using addMenu is the native QMenu class whereas QtPy now exposes a wrapped class. Fixing this might be a matter of overriding addMenu?

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions