當前位置: 首頁>>代碼示例>>Python>>正文


Python QRTextEdit.setMaximumHeight方法代碼示例

本文整理匯總了Python中qrtextedit.QRTextEdit.setMaximumHeight方法的典型用法代碼示例。如果您正苦於以下問題:Python QRTextEdit.setMaximumHeight方法的具體用法?Python QRTextEdit.setMaximumHeight怎麽用?Python QRTextEdit.setMaximumHeight使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在qrtextedit.QRTextEdit的用法示例。


在下文中一共展示了QRTextEdit.setMaximumHeight方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。

示例1: show_seed_box

# 需要導入模塊: from qrtextedit import QRTextEdit [as 別名]
# 或者: from qrtextedit.QRTextEdit import setMaximumHeight [as 別名]
def show_seed_box(seed, sid=None):

    save_msg = _("Please save these %d words on paper (order is important).")%len(seed.split()) + " " 
    qr_msg = _("Your seed is also displayed as QR code, in case you want to transfer it to a mobile phone.") + "<p>"
    warning_msg = "<b>"+_("WARNING")+":</b> " + _("Never disclose your seed. Never type it on a website.") + "</b><p>"

    if sid is None:
        msg =  _("Your wallet generation seed is")
        msg2 = save_msg + " " \
               + _("This seed will allow you to recover your wallet in case of computer failure.") + "<br/>" \
               + warning_msg
        
    elif sid == 'cold':
        msg =  _("Your cold storage seed is")
        msg2 = save_msg + " " \
               + _("This seed will be permanently deleted from your wallet file. Make sure you have saved it before you press 'next'") + " " \
            
    elif sid == 'hot':
        msg =  _("Your hot seed is")
        msg2 = save_msg + " " \
               + _("If you ever need to recover your wallet from seed, you will need both this seed and your cold seed.") + " " \

    label1 = QLabel(msg+ ":")
    seed_text = QRTextEdit(seed)
    seed_text.setReadOnly(True)
    seed_text.setMaximumHeight(130)

    label2 = QLabel(msg2)
    label2.setWordWrap(True)

    logo = QLabel()

    logo.setPixmap(QPixmap(icon_filename(sid)).scaledToWidth(56))
    logo.setMaximumWidth(60)

    grid = QGridLayout()
    grid.addWidget(logo, 0, 0)
    grid.addWidget(label1, 0, 1)
    grid.addWidget(seed_text, 1, 0, 1, 2)
    #qrw = QRCodeWidget(seed)
    #grid.addWidget(qrw, 0, 2, 2, 1)
    vbox = QVBoxLayout()
    vbox.addLayout(grid)
    vbox.addWidget(label2)
    vbox.addStretch(1)
    
    return vbox
開發者ID:StewartDouglas,項目名稱:electrum,代碼行數:49,代碼來源:seed_dialog.py

示例2: enter_seed_box

# 需要導入模塊: from qrtextedit import QRTextEdit [as 別名]
# 或者: from qrtextedit.QRTextEdit import setMaximumHeight [as 別名]
def enter_seed_box(msg, sid=None):

    vbox = QVBoxLayout()
    logo = QLabel()
    logo.setPixmap(QPixmap(icon_filename(sid)).scaledToWidth(56))
    logo.setMaximumWidth(60)

    label = QLabel(msg)
    label.setWordWrap(True)

    seed_e = QRTextEdit()
    seed_e.setMaximumHeight(100)
    seed_e.setTabChangesFocus(True)

    vbox.addWidget(label)

    grid = QGridLayout()
    grid.addWidget(logo, 0, 0)
    grid.addWidget(seed_e, 0, 1)

    vbox.addLayout(grid)
    return vbox, seed_e
開發者ID:ixcoin123,項目名稱:electrum-ixc,代碼行數:24,代碼來源:seed_dialog.py


注:本文中的qrtextedit.QRTextEdit.setMaximumHeight方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。