-
-
Notifications
You must be signed in to change notification settings - Fork 153
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PR: Make QMenu.addAction
and QToolBar.addAction
compatible with Qt6 arguments' order
#437
PR: Make QMenu.addAction
and QToolBar.addAction
compatible with Qt6 arguments' order
#437
Conversation
…atible_with_Qt6 # Conflicts: # qtpy/_utils.py
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @StSav012 for your work here and sorry for the late review! Left some comments regarding the Qt version usage but other than that this LGTM 👍
The tests have failed, but that's not my fault. |
Yep, the failing errors in the CI are unrelated to this and should be fixed after we merge #443 |
Just merged #443 . Updating the branch again with the base branch should make the CI pass 👍 |
Yeah, that's more like it. I'm sorry I haven't looked through the other pending PRs. The tests have indeed become much faster with |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @StSav012 !
Surprisingly, I've stumbled upon that in Qt5 and Qt6,
addAction
accepts arguments in different order. So, here's the monkey patch for that.I've checked other derivatives of
QWidget
, and onlyQMenu
,QToolBar
, andQLineEdit
have non-trivialaddAction
. I haven't patched the latter, for it hasn't changed between Qt5 and Qt6. So, this is the patch forQMenu
andQToolBar
.I don't actually know how to use the
receiver: QObject
and themember: bytes
arguments ofaddAction
, so I haven't tested them.