mirror of
https://github.com/LBRYFoundation/LBRY-Vault.git
synced 2025-08-31 17:31:36 +00:00
spawning electrum gui works if i hide widget and create it. better would be to create both at the startup and hide the inactive one. they need a way to share the wallet though.
This commit is contained in:
parent
7fae935ca8
commit
eda5672344
1 changed files with 18 additions and 7 deletions
|
@ -5,6 +5,7 @@ import decimal
|
|||
import random
|
||||
import re
|
||||
import sys
|
||||
import time
|
||||
|
||||
try:
|
||||
import lib.gui_qt as gui_qt
|
||||
|
@ -16,6 +17,12 @@ def IconButton(filename, parent=None):
|
|||
icon = QIcon(pixmap)
|
||||
return QPushButton(icon, "", parent)
|
||||
|
||||
class Timer(QThread):
|
||||
def run(self):
|
||||
while True:
|
||||
self.emit(SIGNAL('timersignal'))
|
||||
time.sleep(0.5)
|
||||
|
||||
class ElectrumGui:
|
||||
|
||||
def __init__(self, wallet):
|
||||
|
@ -25,18 +32,22 @@ class ElectrumGui:
|
|||
self.app.setStyleSheet(style_file.read())
|
||||
|
||||
def main(self, url):
|
||||
self.actuator = MiniActuator(self.wallet)
|
||||
self.mini = MiniWindow(self.actuator, self.expand)
|
||||
self.driver = MiniDriver(self.wallet, self.mini)
|
||||
sys.exit(self.app.exec_())
|
||||
actuator = MiniActuator(self.wallet)
|
||||
self.mini = MiniWindow(actuator, self.expand)
|
||||
driver = MiniDriver(self.wallet, self.mini)
|
||||
self.app.exec_()
|
||||
|
||||
def expand(self):
|
||||
self.wallet.gui_callback = None
|
||||
self.mini.hide()
|
||||
self.actuator = None
|
||||
self.mini.close()
|
||||
self.mini = None
|
||||
self.driver = None
|
||||
#self.gui = gui_qt.ElectrumGui(self.wallet)
|
||||
self.wallet.gui_callback = None
|
||||
self.timer = Timer()
|
||||
self.timer.start()
|
||||
self.gui = gui_qt.ElectrumWindow(self.wallet)
|
||||
self.gui.connect_slots(self.timer)
|
||||
self.gui.update_wallet()
|
||||
|
||||
class MiniWindow(QDialog):
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue