spinetoolbox.widgets.custom_qtextbrowser

Class for a custom QTextBrowser for showing the logs and tool output.

author:
  1. Savolainen (VTT)
date:

6.2.2018

Module Contents

class spinetoolbox.widgets.custom_qtextbrowser.CustomQTextBrowser(parent)[source]

Bases: PySide2.QtWidgets.QTextBrowser

Custom QTextBrowser class.

parent

Parent widget

Type:QWidget
max_blocks[source]

Returns the upper limit of text blocks that can be appended to the widget.

append(self, text)[source]

Appends new text block to the end of the current contents.

If the widget contains more text blocks after the addition than a set limit, blocks will be deleted at the start of the contents.

Parameters:text (str) – text to add
contextMenuEvent(self, event)[source]

Reimplemented method to add a clear action into the default context menu.

Parameters:event (QContextMenuEvent) – Received event