Python PyQt4.Qt.QGridLayout() Examples
The following are 1
code examples of PyQt4.Qt.QGridLayout().
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example.
You may also want to check out all available functions/classes of the module
PyQt4.Qt
, or try the search function
.
Example #1
Source File: trezor.py From encompass with GNU General Public License v3.0 | 5 votes |
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: