本文整理匯總了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
示例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()
示例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()
示例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()
示例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()
示例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)
示例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()