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

Update Qt.py #403

Merged
merged 11 commits into from
May 7, 2024
Merged

Update Qt.py #403

merged 11 commits into from
May 7, 2024

Conversation

mottosso
Copy link
Owner

@mottosso mottosso commented May 2, 2024

Updating README, tests and version

@mottosso
Copy link
Owner Author

mottosso commented May 5, 2024

Tests for the PySide6 transition is not working. 😭 Help needed, we need to ensure that code written for PySide6 also runs on PySide2 and vice versa, and these two points are the start of that:

@mottosso
Copy link
Owner Author

mottosso commented May 5, 2024

These tests should work for every binding.

def test_midbutton_qt6():
    """QtCore.MidButton was renamed QtCore.MiddleButton in Qt 6"""
    from Qt import QtCore, QtCompat

    if binding("PySide6"):
        assert QtCompat.Qt.MidButton == QtCore.Qt.MiddleButton
    else:
        assert QtCompat.Qt.MidButton == QtCore.Qt.MidButton


def test_set_font_weight():
    """Qt 6 changed font weights from integers to enums"""
    from Qt import QtGui, QtCompat
    font = QtGui.QFont()
    QtCompat.QFont.setWeight(font, 400)

@mottosso
Copy link
Owner Author

mottosso commented May 7, 2024

This seems solid, but QtCompat for upgrading is still wip.

@mottosso mottosso merged commit 33b83f2 into master May 7, 2024
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant