当前位置: 首页>>代码示例>>Python>>正文


Python QLineEdit.Normal方法代码示例

本文整理汇总了Python中PyQt5.QtWidgets.QLineEdit.Normal方法的典型用法代码示例。如果您正苦于以下问题:Python QLineEdit.Normal方法的具体用法?Python QLineEdit.Normal怎么用?Python QLineEdit.Normal使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在PyQt5.QtWidgets.QLineEdit的用法示例。


在下文中一共展示了QLineEdit.Normal方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: make_further_instructions

# 需要导入模块: from PyQt5.QtWidgets import QLineEdit [as 别名]
# 或者: from PyQt5.QtWidgets.QLineEdit import Normal [as 别名]
def make_further_instructions(self, pr):
        def further_instructions():
            response = QMessageBox.information(self, "Next Step", "To continue, send the necessary amounts of Bitcoin to the addresses specified in the 'Outputs' field above. Once broadcast, press Yes to Continue or Cancel to quit.", QMessageBox.Cancel | QMessageBox.Yes, QMessageBox.Cancel)
            if response == QMessageBox.Cancel:
                sys.exit()
            elif response == QMessageBox.Yes:
                if pr.details.payment_url:
                    raw_tx, okPressed1 = QInputDialog.getText(self, "Enter Raw Transaction","Enter the hex of the transaction that was just made:", QLineEdit.Normal, "")
                    if okPressed1 and raw_tx != '':
                        ref_addr, okPressed2 = QInputDialog.getText(self, "Enter Refund Address","Enter a refund address:", QLineEdit.Normal, "")
                        if okPressed2 and ref_addr != '':
                            try:
                                result = pr.send_ack(raw_tx.strip(), ref_addr.strip())
                                if result[0]:
                                    QMessageBox.information(self, "Complete!", "Payment request successful: " + result[1] + "\n\nClick Ok to exit", QMessageBox.Ok, QMessageBox.Ok)
                                    sys.exit()
                                else:
                                    QMessageBox.error(self, "Error!", "Payment request was not successful: " + result[1] + "\n\nClick Ok to exit", QMessageBox.Ok, QMessageBox.Ok)
                                    sys.exit()
                            except:
                                QMessageBox.error(self, "Error!", "There was an error parsing the raw transaction or address. Please restart and try again.\n\nClick Ok to exit", QMessageBox.Ok, QMessageBox.Ok)
                                sys.exit()
                                
        return further_instructions 
开发者ID:achow101,项目名称:payment-proto-interface,代码行数:26,代码来源:gui.py

示例2: update_key_controls_state

# 需要导入模块: from PyQt5.QtWidgets import QLineEdit [as 别名]
# 或者: from PyQt5.QtWidgets.QLineEdit import Normal [as 别名]
def update_key_controls_state(self):
        self.edtOwnerKey.setEchoMode(QLineEdit.Normal if self.btnShowOwnerPrivateKey.isChecked() or
                                                         self.edit_mode else QLineEdit.Password)

        self.edtOperatorKey.setEchoMode(QLineEdit.Normal if self.btnShowOperatorPrivateKey.isChecked() or
                                        self.edit_mode else QLineEdit.Password)

        self.edtVotingKey.setEchoMode(QLineEdit.Normal if self.btnShowVotingPrivateKey.isChecked() or
                                      self.edit_mode else QLineEdit.Password)

        self.update_dynamic_labels() 
开发者ID:Bertrand256,项目名称:dash-masternode-tool,代码行数:13,代码来源:masternode_details.py

示例3: on_btnShowOwnerPrivateKey_toggled

# 需要导入模块: from PyQt5.QtWidgets import QLineEdit [as 别名]
# 或者: from PyQt5.QtWidgets.QLineEdit import Normal [as 别名]
def on_btnShowOwnerPrivateKey_toggled(self, checked):
        self.edtOwnerKey.setEchoMode(QLineEdit.Normal if checked else QLineEdit.Password)
        self.update_key_controls_state() 
开发者ID:Bertrand256,项目名称:dash-masternode-tool,代码行数:5,代码来源:masternode_details.py

示例4: on_btnShowOperatorPrivateKey_toggled

# 需要导入模块: from PyQt5.QtWidgets import QLineEdit [as 别名]
# 或者: from PyQt5.QtWidgets.QLineEdit import Normal [as 别名]
def on_btnShowOperatorPrivateKey_toggled(self, checked):
        self.edtOperatorKey.setEchoMode(QLineEdit.Normal if checked else QLineEdit.Password)
        self.update_key_controls_state() 
开发者ID:Bertrand256,项目名称:dash-masternode-tool,代码行数:5,代码来源:masternode_details.py

示例5: on_btnShowVotingPrivateKey_toggled

# 需要导入模块: from PyQt5.QtWidgets import QLineEdit [as 别名]
# 或者: from PyQt5.QtWidgets.QLineEdit import Normal [as 别名]
def on_btnShowVotingPrivateKey_toggled(self, checked):
        self.edtVotingKey.setEchoMode(QLineEdit.Normal if checked else QLineEdit.Password)
        self.update_key_controls_state() 
开发者ID:Bertrand256,项目名称:dash-masternode-tool,代码行数:5,代码来源:masternode_details.py

示例6: _showTuShareProToken

# 需要导入模块: from PyQt5.QtWidgets import QLineEdit [as 别名]
# 或者: from PyQt5.QtWidgets.QLineEdit import Normal [as 别名]
def _showTuShareProToken(self):
        text = self._tuShareProTokenPushButton.text()
        if text == 'TuSharePro token':
            self._tuShareProTokenPushButton.setText('*TuSharePro token*')
            self._tuShareProTokenLineEdit.setEchoMode(QLineEdit.Password)
        else:
            self._tuShareProTokenPushButton.setText('TuSharePro token')
            self._tuShareProTokenLineEdit.setEchoMode(QLineEdit.Normal) 
开发者ID:moyuanz,项目名称:DevilYuan,代码行数:10,代码来源:DyStockHistDaysDataSourceConfigDlg.py

示例7: __init__

# 需要导入模块: from PyQt5.QtWidgets import QLineEdit [as 别名]
# 或者: from PyQt5.QtWidgets.QLineEdit import Normal [as 别名]
def __init__(self, parent=None):
        super(MainWindow, self).__init__(parent)
        self.setupUi(self)
        icon = QIcon()
        icon.addPixmap(QPixmap("qt.png"))
        self.setWindowIcon(icon)

        self.actionExit.triggered.connect(self.onExitTriggered)

        self.actionCopy.triggered.connect(self.onCopyTriggered)
        self.actionPaste.triggered.connect(self.onPasteTriggered)
        self.actionCut.triggered.connect(self.onCutTriggered)

        # QLabel
        self.label.setToolTip("这是一个气泡提示!")
        self.label.setAlignment(Qt.AlignLeft)
        # self.label.setText('修改后的文本')

        # QLineedit
        self.lineEdit.setAlignment(Qt.AlignRight)
        self.lineEdit.setEchoMode(QLineEdit.Normal)
        self.lineEdit.setText("这是一个QLineedit!")
        print(self.lineEdit.text())

        self.lineEdit.textChanged.connect(self.onQLineeditTextChanged)
        self.lineEdit.editingFinished.connect(self.onQLineeditFinished)
        self.lineEdit.selectionChanged.connect(self.onQLineeditSelectionChanged)

        # QTextEdit
        strs = "MQTT(Message Queuing Telemetry Transport),是一个物联网传输协议,它被设计用于轻量级的发布/订阅式消息传输,旨在为低带宽和不稳定的网络环境中的物联网设备提供可靠的网络服务。MQTT是专门针对物联网开发的轻量级传输协议。MQTT协议针对低带宽网络,低计算能力的设备,做了特殊的优化,使得其能适应各种物联网应用场景。本文旨在研究其在消息发布/订阅/接收场景下的应用."
        self.textEdit.setPlainText(strs)
        print(self.textEdit.toHtml())

        # Qpushbutton
        self.pushButton.setCheckable(True)
        self.pushButton.setEnabled(False)
        self.pushButton.clicked.connect(self.onClicked)

        self.timer = QTimer(self)
        self.count = 0
        self.timer.timeout.connect(self.showNum)
        # self.timer.timeout.connect(self.showNum2)
        # self.startCount() 
开发者ID:xugaoxiang,项目名称:learningPyQt5,代码行数:45,代码来源:mainwindow.py


注:本文中的PyQt5.QtWidgets.QLineEdit.Normal方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。