def customtxt_limits(self):
    txt = self.text.text()
    self.max_chars.setVisible(False)
    self.char_count.setText(f'({len(txt)}/{self.MAX_PLAINTEXT_LEN})')
    if (len(txt) > 0):
        self.ctext.setEnabled(True)
    if (len(txt) > self.MAX_PLAINTEXT_LEN):
        self.text.setPlainText(txt[:self.MAX_PLAINTEXT_LEN])
        self.max_chars.setVisible(True)
def customtxt_limits(self):
    txt = self.text.text()
    self.max_chars.setVisible(False)
    self.char_count.setText(f'({len(txt)}/{self.MAX_PLAINTEXT_LEN})')
    if (len(txt) > 0):
        self.ctext.setEnabled(True)
    if (len(txt) > self.MAX_PLAINTEXT_LEN):
        self.text.setPlainText(txt[:self.MAX_PLAINTEXT_LEN])
        self.max_chars.setVisible(True)