2013-09-14 12:07:54 -07:00
|
|
|
#!/usr/bin/env python
|
|
|
|
#
|
|
|
|
# Electrum - lightweight Bitcoin client
|
|
|
|
# Copyright (C) 2012 thomasv@gitorious
|
|
|
|
#
|
2016-02-23 02:36:42 -08:00
|
|
|
# Permission is hereby granted, free of charge, to any person
|
|
|
|
# obtaining a copy of this software and associated documentation files
|
|
|
|
# (the "Software"), to deal in the Software without restriction,
|
|
|
|
# including without limitation the rights to use, copy, modify, merge,
|
|
|
|
# publish, distribute, sublicense, and/or sell copies of the Software,
|
|
|
|
# and to permit persons to whom the Software is furnished to do so,
|
|
|
|
# subject to the following conditions:
|
2013-09-14 12:07:54 -07:00
|
|
|
#
|
2016-02-23 02:36:42 -08:00
|
|
|
# The above copyright notice and this permission notice shall be
|
|
|
|
# included in all copies or substantial portions of the Software.
|
2013-09-14 12:07:54 -07:00
|
|
|
#
|
2016-02-23 02:36:42 -08:00
|
|
|
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
|
|
# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
|
|
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
|
|
|
# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
|
|
|
|
# BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
|
|
|
|
# ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
|
|
|
# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
|
|
# SOFTWARE.
|
2016-02-28 02:10:09 -08:00
|
|
|
import copy
|
2015-06-24 23:58:40 -07:00
|
|
|
import datetime
|
|
|
|
import json
|
2013-09-14 12:07:54 -07:00
|
|
|
|
2017-09-22 20:54:38 -07:00
|
|
|
from PyQt5.QtCore import *
|
2017-11-12 20:54:04 -08:00
|
|
|
from PyQt5.QtGui import *
|
|
|
|
from PyQt5.QtWidgets import *
|
2013-09-14 12:07:54 -07:00
|
|
|
|
2015-02-26 04:59:29 -08:00
|
|
|
from electrum.bitcoin import base_encode
|
2015-06-24 23:58:40 -07:00
|
|
|
from electrum.i18n import _
|
2014-06-12 13:24:10 -07:00
|
|
|
from electrum.plugins import run_hook
|
|
|
|
|
2017-02-16 01:54:24 -08:00
|
|
|
from electrum.util import bfh
|
2018-01-28 14:11:43 -08:00
|
|
|
from electrum.wallet import UnrelatedTransactionException
|
|
|
|
|
2017-01-22 10:25:24 -08:00
|
|
|
from .util import *
|
2015-03-14 11:08:56 -07:00
|
|
|
|
2015-07-03 20:26:28 -07:00
|
|
|
dialogs = [] # Otherwise python randomly garbage collects the dialogs...
|
|
|
|
|
2015-06-26 18:56:01 -07:00
|
|
|
def show_transaction(tx, parent, desc=None, prompt_if_unsaved=False):
|
|
|
|
d = TxDialog(tx, parent, desc, prompt_if_unsaved)
|
2015-07-03 20:26:28 -07:00
|
|
|
dialogs.append(d)
|
2015-06-26 18:56:01 -07:00
|
|
|
d.show()
|
2013-09-14 12:07:54 -07:00
|
|
|
|
2015-12-23 01:31:36 -08:00
|
|
|
class TxDialog(QDialog, MessageBoxMixin):
|
2013-09-14 12:07:54 -07:00
|
|
|
|
2015-06-26 18:56:01 -07:00
|
|
|
def __init__(self, tx, parent, desc, prompt_if_unsaved):
|
2015-06-24 23:58:40 -07:00
|
|
|
'''Transactions in the wallet will show their description.
|
|
|
|
Pass desc to give a description for txs not yet in the wallet.
|
|
|
|
'''
|
2016-02-28 02:10:09 -08:00
|
|
|
# We want to be a top-level window
|
|
|
|
QDialog.__init__(self, parent=None)
|
|
|
|
# Take a copy; it might get updated in the main window by
|
|
|
|
# e.g. the FX plugin. If this happens during or after a long
|
|
|
|
# sign operation the signatures are lost.
|
|
|
|
self.tx = copy.deepcopy(tx)
|
2015-07-04 08:33:18 -07:00
|
|
|
self.tx.deserialize()
|
2016-01-16 20:36:40 -08:00
|
|
|
self.main_window = parent
|
2013-09-14 12:07:54 -07:00
|
|
|
self.wallet = parent.wallet
|
2015-07-03 20:26:28 -07:00
|
|
|
self.prompt_if_unsaved = prompt_if_unsaved
|
|
|
|
self.saved = False
|
2015-06-24 23:58:40 -07:00
|
|
|
self.desc = desc
|
2014-10-21 10:05:51 -07:00
|
|
|
|
2017-10-27 07:32:08 -07:00
|
|
|
self.setMinimumWidth(750)
|
2013-09-16 20:19:23 -07:00
|
|
|
self.setWindowTitle(_("Transaction"))
|
2013-09-14 12:07:54 -07:00
|
|
|
|
|
|
|
vbox = QVBoxLayout()
|
|
|
|
self.setLayout(vbox)
|
|
|
|
|
2013-09-16 20:19:23 -07:00
|
|
|
vbox.addWidget(QLabel(_("Transaction ID:")))
|
2015-04-20 02:49:27 -07:00
|
|
|
self.tx_hash_e = ButtonsLineEdit()
|
2016-01-16 20:36:40 -08:00
|
|
|
qr_show = lambda: parent.show_qrcode(str(self.tx_hash_e.text()), 'Transaction ID', parent=self)
|
2015-04-20 02:49:27 -07:00
|
|
|
self.tx_hash_e.addButton(":icons/qrcode.png", qr_show, _("Show as QR code"))
|
2013-09-14 12:07:54 -07:00
|
|
|
self.tx_hash_e.setReadOnly(True)
|
|
|
|
vbox.addWidget(self.tx_hash_e)
|
2015-06-24 23:58:40 -07:00
|
|
|
self.tx_desc = QLabel()
|
|
|
|
vbox.addWidget(self.tx_desc)
|
2016-06-07 08:12:31 -07:00
|
|
|
self.status_label = QLabel()
|
|
|
|
vbox.addWidget(self.status_label)
|
2013-09-14 12:07:54 -07:00
|
|
|
self.date_label = QLabel()
|
|
|
|
vbox.addWidget(self.date_label)
|
|
|
|
self.amount_label = QLabel()
|
|
|
|
vbox.addWidget(self.amount_label)
|
2016-12-17 08:28:19 -08:00
|
|
|
self.size_label = QLabel()
|
|
|
|
vbox.addWidget(self.size_label)
|
2013-09-14 12:07:54 -07:00
|
|
|
self.fee_label = QLabel()
|
|
|
|
vbox.addWidget(self.fee_label)
|
|
|
|
|
2013-09-15 04:29:09 -07:00
|
|
|
self.add_io(vbox)
|
|
|
|
|
2013-09-15 02:41:06 -07:00
|
|
|
vbox.addStretch(1)
|
2013-09-14 12:07:54 -07:00
|
|
|
|
|
|
|
self.sign_button = b = QPushButton(_("Sign"))
|
|
|
|
b.clicked.connect(self.sign)
|
|
|
|
|
|
|
|
self.broadcast_button = b = QPushButton(_("Broadcast"))
|
2015-03-25 02:46:15 -07:00
|
|
|
b.clicked.connect(self.do_broadcast)
|
2013-09-14 12:07:54 -07:00
|
|
|
|
2018-01-28 14:11:43 -08:00
|
|
|
self.save_button = QPushButton(_("Save"))
|
2018-01-30 20:27:28 -08:00
|
|
|
save_button_disabled = not tx.is_complete()
|
|
|
|
self.save_button.setDisabled(save_button_disabled)
|
|
|
|
if save_button_disabled:
|
|
|
|
self.save_button.setToolTip(_("Please sign this transaction in order to save it"))
|
|
|
|
else:
|
|
|
|
self.save_button.setToolTip("")
|
2018-01-28 14:11:43 -08:00
|
|
|
self.save_button.clicked.connect(self.save)
|
|
|
|
|
|
|
|
self.export_button = b = QPushButton(_("Export"))
|
|
|
|
b.clicked.connect(self.export)
|
2013-09-14 12:07:54 -07:00
|
|
|
|
2015-03-14 11:08:56 -07:00
|
|
|
self.cancel_button = b = QPushButton(_("Close"))
|
2015-03-25 02:46:15 -07:00
|
|
|
b.clicked.connect(self.close)
|
2015-03-14 11:08:56 -07:00
|
|
|
b.setDefault(True)
|
2014-06-12 13:24:10 -07:00
|
|
|
|
2015-03-14 11:08:56 -07:00
|
|
|
self.qr_button = b = QPushButton()
|
2014-06-23 00:42:07 -07:00
|
|
|
b.setIcon(QIcon(":icons/qrcode.png"))
|
2014-06-17 07:24:01 -07:00
|
|
|
b.clicked.connect(self.show_qr)
|
2013-09-14 12:07:54 -07:00
|
|
|
|
2016-01-16 20:36:40 -08:00
|
|
|
self.copy_button = CopyButton(lambda: str(self.tx), parent.app)
|
2015-04-20 05:44:59 -07:00
|
|
|
|
2015-06-26 19:48:27 -07:00
|
|
|
# Action buttons
|
2018-01-28 14:11:43 -08:00
|
|
|
self.buttons = [self.sign_button, self.broadcast_button, self.save_button, self.cancel_button]
|
2015-06-29 07:00:31 -07:00
|
|
|
# Transaction sharing buttons
|
2018-01-28 14:11:43 -08:00
|
|
|
self.sharing_buttons = [self.copy_button, self.qr_button, self.export_button]
|
2015-06-29 07:00:31 -07:00
|
|
|
|
2014-06-20 02:55:34 -07:00
|
|
|
run_hook('transaction_dialog', self)
|
2014-10-21 10:05:51 -07:00
|
|
|
|
2015-06-26 19:48:27 -07:00
|
|
|
hbox = QHBoxLayout()
|
2015-06-29 07:00:31 -07:00
|
|
|
hbox.addLayout(Buttons(*self.sharing_buttons))
|
2015-06-26 19:48:27 -07:00
|
|
|
hbox.addStretch(1)
|
|
|
|
hbox.addLayout(Buttons(*self.buttons))
|
|
|
|
vbox.addLayout(hbox)
|
2014-06-24 05:48:15 -07:00
|
|
|
self.update()
|
2014-06-20 02:55:34 -07:00
|
|
|
|
2015-03-25 02:46:15 -07:00
|
|
|
def do_broadcast(self):
|
2016-01-22 23:06:32 -08:00
|
|
|
self.main_window.push_top_level_window(self)
|
|
|
|
try:
|
|
|
|
self.main_window.broadcast_transaction(self.tx, self.desc)
|
|
|
|
finally:
|
|
|
|
self.main_window.pop_top_level_window(self)
|
2016-01-25 02:26:02 -08:00
|
|
|
self.saved = True
|
2015-07-03 20:26:28 -07:00
|
|
|
self.update()
|
2015-03-25 02:46:15 -07:00
|
|
|
|
2015-07-03 20:26:28 -07:00
|
|
|
def closeEvent(self, event):
|
2016-01-25 02:26:02 -08:00
|
|
|
if (self.prompt_if_unsaved and not self.saved
|
2018-01-31 07:44:50 -08:00
|
|
|
and not self.question(_('This transaction is not saved. Close anyway?'), title=_("Warning"))):
|
2015-07-03 20:26:28 -07:00
|
|
|
event.ignore()
|
|
|
|
else:
|
|
|
|
event.accept()
|
2018-01-31 07:44:50 -08:00
|
|
|
try:
|
|
|
|
dialogs.remove(self)
|
|
|
|
except ValueError:
|
|
|
|
pass # was not in list already
|
2013-09-14 12:07:54 -07:00
|
|
|
|
2014-06-17 07:24:01 -07:00
|
|
|
def show_qr(self):
|
2017-02-04 06:48:13 -08:00
|
|
|
text = bfh(str(self.tx))
|
2015-02-26 04:59:29 -08:00
|
|
|
text = base_encode(text, base=43)
|
2014-06-17 07:24:01 -07:00
|
|
|
try:
|
2016-01-16 20:36:40 -08:00
|
|
|
self.main_window.show_qrcode(text, 'Transaction', parent=self)
|
2014-06-17 07:24:01 -07:00
|
|
|
except Exception as e:
|
2014-06-19 00:42:19 -07:00
|
|
|
self.show_message(str(e))
|
2013-09-14 12:07:54 -07:00
|
|
|
|
|
|
|
def sign(self):
|
2015-06-02 22:24:15 -07:00
|
|
|
def sign_done(success):
|
2015-12-25 18:18:32 -08:00
|
|
|
if success:
|
2016-01-25 02:26:02 -08:00
|
|
|
self.prompt_if_unsaved = True
|
2015-12-25 18:18:32 -08:00
|
|
|
self.saved = False
|
2018-01-28 14:11:43 -08:00
|
|
|
self.save_button.setDisabled(False)
|
|
|
|
self.save_button.setToolTip("")
|
2016-10-21 15:32:19 -07:00
|
|
|
self.update()
|
|
|
|
self.main_window.pop_top_level_window(self)
|
2015-07-04 02:25:44 -07:00
|
|
|
|
2015-12-25 18:18:32 -08:00
|
|
|
self.sign_button.setDisabled(True)
|
2016-01-22 23:06:32 -08:00
|
|
|
self.main_window.push_top_level_window(self)
|
|
|
|
self.main_window.sign_tx(self.tx, sign_done)
|
2013-09-14 12:07:54 -07:00
|
|
|
|
|
|
|
def save(self):
|
2018-01-28 14:11:43 -08:00
|
|
|
self.wallet.add_transaction(self.tx.txid(), self.tx)
|
|
|
|
self.wallet.save_transactions(write=True)
|
|
|
|
|
|
|
|
self.main_window.history_list.update()
|
|
|
|
|
|
|
|
self.save_button.setDisabled(True)
|
|
|
|
self.show_message(_("Transaction saved successfully"))
|
|
|
|
self.saved = True
|
|
|
|
|
|
|
|
|
|
|
|
def export(self):
|
2018-01-12 05:18:50 -08:00
|
|
|
name = 'signed_%s.txn' % (self.tx.txid()[0:8]) if self.tx.is_complete() else 'unsigned.txn'
|
2016-01-16 20:36:40 -08:00
|
|
|
fileName = self.main_window.getSaveFileName(_("Select where to save your signed transaction"), name, "*.txn")
|
2013-09-14 12:07:54 -07:00
|
|
|
if fileName:
|
|
|
|
with open(fileName, "w+") as f:
|
2015-07-04 08:33:18 -07:00
|
|
|
f.write(json.dumps(self.tx.as_dict(), indent=4) + '\n')
|
2018-01-28 14:11:43 -08:00
|
|
|
self.show_message(_("Transaction exported successfully"))
|
2015-03-25 02:46:15 -07:00
|
|
|
self.saved = True
|
2013-09-14 12:07:54 -07:00
|
|
|
|
|
|
|
def update(self):
|
2016-06-08 02:06:51 -07:00
|
|
|
desc = self.desc
|
2016-06-07 08:12:31 -07:00
|
|
|
base_unit = self.main_window.base_unit()
|
|
|
|
format_amount = self.main_window.format_amount
|
2016-06-08 03:55:42 -07:00
|
|
|
tx_hash, status, label, can_broadcast, can_rbf, amount, fee, height, conf, timestamp, exp_n = self.wallet.get_tx_info(self.tx)
|
2016-12-17 08:28:19 -08:00
|
|
|
size = self.tx.estimated_size()
|
2016-10-21 15:32:19 -07:00
|
|
|
self.broadcast_button.setEnabled(can_broadcast)
|
2017-11-25 21:20:40 -08:00
|
|
|
can_sign = not self.tx.is_complete() and \
|
|
|
|
(self.wallet.can_sign(self.tx) or bool(self.main_window.tx_external_keypairs))
|
|
|
|
self.sign_button.setEnabled(can_sign)
|
2016-06-09 09:09:45 -07:00
|
|
|
self.tx_hash_e.setText(tx_hash or _('Unknown'))
|
2015-06-24 23:58:40 -07:00
|
|
|
if desc is None:
|
|
|
|
self.tx_desc.hide()
|
|
|
|
else:
|
|
|
|
self.tx_desc.setText(_("Description") + ': ' + desc)
|
|
|
|
self.tx_desc.show()
|
2014-06-22 03:07:41 -07:00
|
|
|
self.status_label.setText(_('Status:') + ' ' + status)
|
2013-09-14 12:07:54 -07:00
|
|
|
|
2016-06-08 02:22:58 -07:00
|
|
|
if timestamp:
|
2016-06-08 02:06:51 -07:00
|
|
|
time_str = datetime.datetime.fromtimestamp(timestamp).isoformat(' ')[:-3]
|
2013-09-16 20:19:23 -07:00
|
|
|
self.date_label.setText(_("Date: %s")%time_str)
|
2013-09-14 12:07:54 -07:00
|
|
|
self.date_label.show()
|
2016-06-07 08:12:31 -07:00
|
|
|
elif exp_n:
|
2016-06-15 04:31:24 -07:00
|
|
|
text = '%d blocks'%(exp_n) if exp_n > 0 else _('unknown (low fee)')
|
|
|
|
self.date_label.setText(_('Expected confirmation time') + ': ' + text)
|
2016-06-07 08:12:31 -07:00
|
|
|
self.date_label.show()
|
2013-09-14 12:07:54 -07:00
|
|
|
else:
|
|
|
|
self.date_label.hide()
|
2016-06-08 02:06:51 -07:00
|
|
|
if amount is None:
|
2016-06-02 01:40:16 -07:00
|
|
|
amount_str = _("Transaction unrelated to your wallet")
|
2016-06-08 02:06:51 -07:00
|
|
|
elif amount > 0:
|
|
|
|
amount_str = _("Amount received:") + ' %s'% format_amount(amount) + ' ' + base_unit
|
|
|
|
else:
|
|
|
|
amount_str = _("Amount sent:") + ' %s'% format_amount(-amount) + ' ' + base_unit
|
2016-12-17 08:28:19 -08:00
|
|
|
size_str = _("Size:") + ' %d bytes'% size
|
|
|
|
fee_str = _("Fee") + ': %s'% (format_amount(fee) + ' ' + base_unit if fee is not None else _('unknown'))
|
2016-12-07 21:03:55 -08:00
|
|
|
if fee is not None:
|
2017-08-01 01:33:42 -07:00
|
|
|
fee_str += ' ( %s ) '% self.main_window.format_fee_rate(fee/size*1000)
|
2016-06-02 01:40:16 -07:00
|
|
|
self.amount_label.setText(amount_str)
|
|
|
|
self.fee_label.setText(fee_str)
|
2016-12-17 08:28:19 -08:00
|
|
|
self.size_label.setText(size_str)
|
2014-06-24 05:48:15 -07:00
|
|
|
run_hook('transaction_dialog_update', self)
|
2013-09-14 12:07:54 -07:00
|
|
|
|
2013-09-15 04:29:09 -07:00
|
|
|
def add_io(self, vbox):
|
2014-03-05 13:04:31 -08:00
|
|
|
if self.tx.locktime > 0:
|
|
|
|
vbox.addWidget(QLabel("LockTime: %d\n" % self.tx.locktime))
|
|
|
|
|
2016-01-17 05:12:57 -08:00
|
|
|
vbox.addWidget(QLabel(_("Inputs") + ' (%d)'%len(self.tx.inputs())))
|
2015-03-28 12:26:30 -07:00
|
|
|
ext = QTextCharFormat()
|
2015-06-25 19:55:20 -07:00
|
|
|
rec = QTextCharFormat()
|
2017-10-22 11:05:52 -07:00
|
|
|
rec.setBackground(QBrush(ColorScheme.GREEN.as_color(background=True)))
|
2015-06-25 19:55:20 -07:00
|
|
|
rec.setToolTip(_("Wallet receive address"))
|
|
|
|
chg = QTextCharFormat()
|
|
|
|
chg.setBackground(QBrush(QColor("yellow")))
|
|
|
|
chg.setToolTip(_("Wallet change address"))
|
|
|
|
|
|
|
|
def text_format(addr):
|
|
|
|
if self.wallet.is_mine(addr):
|
|
|
|
return chg if self.wallet.is_change(addr) else rec
|
|
|
|
return ext
|
2015-03-28 12:26:30 -07:00
|
|
|
|
2015-12-11 16:41:31 -08:00
|
|
|
def format_amount(amt):
|
2016-01-16 20:36:40 -08:00
|
|
|
return self.main_window.format_amount(amt, whitespaces = True)
|
2015-12-11 16:41:31 -08:00
|
|
|
|
2014-03-02 09:11:56 -08:00
|
|
|
i_text = QTextEdit()
|
2014-10-23 07:45:51 -07:00
|
|
|
i_text.setFont(QFont(MONOSPACE_FONT))
|
2013-09-15 04:29:09 -07:00
|
|
|
i_text.setReadOnly(True)
|
|
|
|
i_text.setMaximumHeight(100)
|
2015-03-28 12:26:30 -07:00
|
|
|
cursor = i_text.textCursor()
|
2016-01-17 05:12:57 -08:00
|
|
|
for x in self.tx.inputs():
|
2017-03-21 01:08:16 -07:00
|
|
|
if x['type'] == 'coinbase':
|
2015-03-28 12:26:30 -07:00
|
|
|
cursor.insertText('coinbase')
|
|
|
|
else:
|
2015-03-28 12:53:49 -07:00
|
|
|
prevout_hash = x.get('prevout_hash')
|
|
|
|
prevout_n = x.get('prevout_n')
|
2015-06-26 04:15:51 -07:00
|
|
|
cursor.insertText(prevout_hash[0:8] + '...', ext)
|
2015-06-26 19:01:42 -07:00
|
|
|
cursor.insertText(prevout_hash[-8:] + ":%-4d " % prevout_n, ext)
|
2015-03-28 12:26:30 -07:00
|
|
|
addr = x.get('address')
|
2015-03-28 12:53:49 -07:00
|
|
|
if addr == "(pubkey)":
|
|
|
|
_addr = self.wallet.find_pay_to_pubkey_address(prevout_hash, prevout_n)
|
|
|
|
if _addr:
|
|
|
|
addr = _addr
|
2015-05-02 07:17:50 -07:00
|
|
|
if addr is None:
|
|
|
|
addr = _('unknown')
|
2015-06-25 19:55:20 -07:00
|
|
|
cursor.insertText(addr, text_format(addr))
|
2015-12-12 00:52:19 -08:00
|
|
|
if x.get('value'):
|
|
|
|
cursor.insertText(format_amount(x['value']), ext)
|
2015-03-28 12:26:30 -07:00
|
|
|
cursor.insertBlock()
|
2013-09-14 12:07:54 -07:00
|
|
|
|
2015-03-28 12:26:30 -07:00
|
|
|
vbox.addWidget(i_text)
|
2016-01-17 05:12:57 -08:00
|
|
|
vbox.addWidget(QLabel(_("Outputs") + ' (%d)'%len(self.tx.outputs())))
|
2013-09-15 04:29:09 -07:00
|
|
|
o_text = QTextEdit()
|
2014-10-23 07:45:51 -07:00
|
|
|
o_text.setFont(QFont(MONOSPACE_FONT))
|
2013-09-15 04:29:09 -07:00
|
|
|
o_text.setReadOnly(True)
|
|
|
|
o_text.setMaximumHeight(100)
|
2015-03-28 12:26:30 -07:00
|
|
|
cursor = o_text.textCursor()
|
|
|
|
for addr, v in self.tx.get_outputs():
|
2015-06-25 19:55:20 -07:00
|
|
|
cursor.insertText(addr, text_format(addr))
|
2015-03-28 12:26:30 -07:00
|
|
|
if v is not None:
|
|
|
|
cursor.insertText('\t', ext)
|
2015-12-11 16:41:31 -08:00
|
|
|
cursor.insertText(format_amount(v), ext)
|
2015-03-28 12:26:30 -07:00
|
|
|
cursor.insertBlock()
|
2013-09-15 04:29:09 -07:00
|
|
|
vbox.addWidget(o_text)
|