Skip to content
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

Add QtCore.Qt.MouseButton.MidButton alias for Qt6 #475

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

PierreRaybaut
Copy link
Contributor

If QtCore.Qt.MidButton works with QtPy and Qt6, then QtCore.Qt.MouseButton.MidButton is expected to work as well.

If QtCore.Qt.MidButton works with QtPy and Qt6, then QtCore.Qt.MouseButton.MidButton is expected to work as well.
@coveralls
Copy link

Coverage Status

coverage: 96.781%. remained the same
when pulling bdbda26 on PR-Add-QtCore.Qt.MouseButton.MidButton-alias-for-Qt6
into 3238de7 on master.

@dalthviz dalthviz added this to the v2.4.2 milestone Apr 10, 2024
Copy link
Member

@dalthviz dalthviz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @PierreRaybaut ! Sorry for the late response and thank you for the fix! Could you also add the alias to the test at

def test_enum_access():
"""Test scoped and unscoped enum access for qtpy.QtCore.*."""
assert (
QtCore.QAbstractAnimation.Stopped
== QtCore.QAbstractAnimation.State.Stopped
)
assert QtCore.QEvent.ActionAdded == QtCore.QEvent.Type.ActionAdded
assert QtCore.Qt.AlignLeft == QtCore.Qt.AlignmentFlag.AlignLeft
assert QtCore.Qt.Key_Return == QtCore.Qt.Key.Key_Return
assert QtCore.Qt.transparent == QtCore.Qt.GlobalColor.transparent
assert QtCore.Qt.Widget == QtCore.Qt.WindowType.Widget
assert QtCore.Qt.BackButton == QtCore.Qt.MouseButton.BackButton
assert QtCore.Qt.XButton1 == QtCore.Qt.MouseButton.XButton1
assert (
QtCore.Qt.BackgroundColorRole
== QtCore.Qt.ItemDataRole.BackgroundColorRole
)
assert QtCore.Qt.TextColorRole == QtCore.Qt.ItemDataRole.TextColorRole
assert QtCore.Qt.MidButton == QtCore.Qt.MouseButton.MiddleButton

?

Other than that this LGTM 👍 Thanks again!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants