qt desktop gui: upgrade qt5->qt6
closes https://github.com/spesmilo/electrum/issues/8007
This commit is contained in:
@@ -2,9 +2,9 @@ import threading
|
||||
from functools import partial
|
||||
from typing import TYPE_CHECKING
|
||||
|
||||
from PyQt5.QtCore import Qt, pyqtSignal, QRegExp
|
||||
from PyQt5.QtGui import QRegExpValidator
|
||||
from PyQt5.QtWidgets import (QVBoxLayout, QLabel, QGridLayout, QPushButton,
|
||||
from PyQt6.QtCore import Qt, pyqtSignal, QRegularExpression
|
||||
from PyQt6.QtGui import QRegularExpressionValidator
|
||||
from PyQt6.QtWidgets import (QVBoxLayout, QLabel, QGridLayout, QPushButton,
|
||||
QHBoxLayout, QButtonGroup, QGroupBox,
|
||||
QTextEdit, QLineEdit, QRadioButton, QCheckBox, QWidget,
|
||||
QMessageBox, QFileDialog, QSlider, QTabWidget)
|
||||
@@ -66,7 +66,7 @@ class QtHandler(QtHandlerBase):
|
||||
vbox.addWidget(matrix)
|
||||
vbox.addLayout(Buttons(CancelButton(dialog), OkButton(dialog)))
|
||||
dialog.setLayout(vbox)
|
||||
dialog.exec_()
|
||||
dialog.exec()
|
||||
self.response = str(matrix.get_value())
|
||||
self.done.set()
|
||||
|
||||
@@ -94,7 +94,7 @@ class QtPlugin(QtPluginBase):
|
||||
return device_id
|
||||
def show_dialog(device_id):
|
||||
if device_id:
|
||||
SettingsDialog(window, self, keystore, device_id).exec_()
|
||||
SettingsDialog(window, self, keystore, device_id).exec()
|
||||
keystore.thread.add(connect, on_success=show_dialog)
|
||||
|
||||
|
||||
@@ -152,7 +152,7 @@ class SafeTInitLayout(QVBoxLayout):
|
||||
self.addWidget(QLabel(msg))
|
||||
self.addWidget(self.text_e)
|
||||
self.pin = QLineEdit()
|
||||
self.pin.setValidator(QRegExpValidator(QRegExp('[1-9]{0,9}')))
|
||||
self.pin.setValidator(QRegularExpressionValidator(QRegularExpression('[1-9]{0,9}')))
|
||||
self.pin.setMaximumWidth(100)
|
||||
hbox_pin = QHBoxLayout()
|
||||
hbox_pin.addWidget(QLabel(_("Enter your PIN (digits 1-9):")))
|
||||
@@ -351,7 +351,7 @@ class SettingsDialog(WindowModalDialog):
|
||||
msg = _("Are you SURE you want to wipe the device?\n"
|
||||
"Your wallet still has bitcoins in it!")
|
||||
if not self.question(msg, title=title,
|
||||
icon=QMessageBox.Critical):
|
||||
icon=QMessageBox.Icon.Critical):
|
||||
return
|
||||
invoke_client('wipe_device', unpair_after=True)
|
||||
|
||||
@@ -453,11 +453,11 @@ class SettingsDialog(WindowModalDialog):
|
||||
# Settings tab - Session Timeout
|
||||
timeout_label = QLabel(_("Session Timeout"))
|
||||
timeout_minutes = QLabel()
|
||||
timeout_slider = QSlider(Qt.Horizontal)
|
||||
timeout_slider = QSlider(Qt.Orientation.Horizontal)
|
||||
timeout_slider.setRange(1, 60)
|
||||
timeout_slider.setSingleStep(1)
|
||||
timeout_slider.setTickInterval(5)
|
||||
timeout_slider.setTickPosition(QSlider.TicksBelow)
|
||||
timeout_slider.setTickPosition(QSlider.TickPosition.TicksBelow)
|
||||
timeout_slider.setTracking(True)
|
||||
timeout_msg = QLabel(
|
||||
_("Clear the session after the specified period "
|
||||
|
||||
Reference in New Issue
Block a user