Added explanation to line returning qVariant for future eyes.

This commit is contained in:
Amir Taaki 2012-08-23 10:09:54 +01:00
parent 77b3052f44
commit 89953895f8
1 changed files with 2 additions and 0 deletions

View File

@ -322,6 +322,8 @@ class MiniWindow(QDialog):
def check_button_status(self): def check_button_status(self):
"""Check that the bitcoin address is valid and that something """Check that the bitcoin address is valid and that something
is entered in the amount before making the send button clickable.""" is entered in the amount before making the send button clickable."""
# self.address_input.property(...) returns a qVariant, not a bool.
# The == is needed to properly invoke a comparison.
if (self.address_input.property("isValid") == True and if (self.address_input.property("isValid") == True and
len(self.amount_input.text()) > 0): len(self.amount_input.text()) > 0):
self.send_button.setDisabled(False) self.send_button.setDisabled(False)