Skip to content

Commit

Permalink
feat(TextBlock): add __str__ method
Browse files Browse the repository at this point in the history
  • Loading branch information
phil65 committed Nov 8, 2021
1 parent 2f4d3be commit b0e815d
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions prettyqt/gui/textblock.py
Expand Up @@ -25,6 +25,9 @@ def __contains__(self, position: int):
def __bool__(self):
return self.isValid()

def __str__(self):
return self.text()

def get_previous(self) -> TextBlock:
return TextBlock(self.previous())

Expand Down

0 comments on commit b0e815d

Please sign in to comment.