1
0

qml: port PyQt5 to PyQt6

This commit is contained in:
Sander van Grieken
2023-07-14 13:51:08 +02:00
parent 0441cb0ad5
commit 6270eae5c9
41 changed files with 199 additions and 162 deletions

View File

@@ -1,6 +1,7 @@
import threading
from enum import IntEnum
from PyQt5.QtCore import pyqtProperty, pyqtSignal, pyqtSlot, QObject, Q_ENUMS
from PyQt6.QtCore import pyqtProperty, pyqtSignal, pyqtSlot, QObject, pyqtEnum
from electrum.i18n import _
from electrum.gui import messages
@@ -17,12 +18,11 @@ from .util import QtEventListener, event_listener
class QEChannelDetails(AuthMixin, QObject, QtEventListener):
_logger = get_logger(__name__)
class State: # subset, only ones we currently need in UI
@pyqtEnum
class State(IntEnum): # subset, only ones we currently need in UI
Closed = ChannelState.CLOSED
Redeemed = ChannelState.REDEEMED
Q_ENUMS(State)
channelChanged = pyqtSignal()
channelCloseSuccess = pyqtSignal()
channelCloseFailed = pyqtSignal([str], arguments=['message'])