Convert code to use scoped PyQt enums

XMLWordPrintable

    • Type: Task
    • Resolution: Fixed
    • Priority: Normal
    • 2.8.0rc1
    • Affects Version/s: None
    • Component/s: Other
    • None

      Since PyQt 5.11 the Qt enum values are also available as scoped enums, making use of actual Python enums.

      That means instead of e.g. QtWidgets.QAbstractItemView.ExtendedSelection this value can be accessed with QtWidgets.QAbstractItemView.SelectionMode.ExtendedSelection

      In PyQt6 this scoped access is the only possible access. In order to ease the actualy PyQt6 migration we plan to do this conversion for PyQt5 in Picard 2.8.

      See https://www.riverbankcomputing.com/static/Docs/PyQt5/gotchas.html#enums

            Assignee:
            Philipp Wolfer
            Reporter:
            Philipp Wolfer
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

                Version Package
                2.8.0rc1