예제 #1
0
 def show_notes(self, text=''):
     text = (text or '').strip()
     self.setVisible(bool(text))
     self.current_notes = text
     html = '\n'.join(render_notes(text))
     self.setHtml('<div><a href="edit://moo" style="text-decoration: none">{}</a></div>{}'.format(_('Edit notes'), html))
     h = self.document().size().height() + 2
     self.setMaximumHeight(h)
예제 #2
0
 def show_notes(self, text=''):
     text = (text or '').strip()
     self.setVisible(bool(text))
     self.current_notes = text
     self.browser.setHtml('\n'.join(render_notes(text)))
     h = self.browser.document().size().height() + 8
     self.browser.setMaximumHeight(h)
     self.setMaximumHeight(max(self.edit_button.sizeHint().height() + 4, h))