本文整理匯總了Python中PyQt4.Qt.QGridLayout方法的典型用法代碼示例。如果您正苦於以下問題:Python Qt.QGridLayout方法的具體用法?Python Qt.QGridLayout怎麽用?Python Qt.QGridLayout使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類PyQt4.Qt
的用法示例。
在下文中一共展示了Qt.QGridLayout方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: settings_dialog
# 需要導入模塊: from PyQt4 import Qt [as 別名]
# 或者: from PyQt4.Qt import QGridLayout [as 別名]
def settings_dialog(self):
get_label = lambda: self.wallet.get_client().features.label
update_label = lambda: current_label_label.setText("Label: %s" % get_label())
d = QDialog()
layout = QGridLayout(d)
layout.addWidget(QLabel("Trezor Options"),0,0)
layout.addWidget(QLabel("ID:"),1,0)
layout.addWidget(QLabel(" %s" % self.wallet.get_client().get_device_id()),1,1)
def modify_label():
response = QInputDialog().getText(None, "Set New Trezor Label", "New Trezor Label: (upon submission confirm on Trezor)")
if not response[1]:
return
new_label = str(response[0])
twd.start("Please confirm label change on Trezor")
status = self.wallet.get_client().apply_settings(label=new_label)
twd.stop()
update_label()
current_label_label = QLabel()
update_label()
change_label_button = QPushButton("Modify")
change_label_button.clicked.connect(modify_label)
layout.addWidget(current_label_label,3,0)
layout.addWidget(change_label_button,3,1)
def remove_pin():
# twd.start("Please confirm pin removal on Trezor")
try:
status = self.wallet.get_client().change_pin(True)
print_error(status)
self.show_message(status)
except Exception, e:
give_error(e)
finally: