Add QJsonModel.clear

This also fixed the test.
This commit is contained in:
David Lai 2020-10-21 00:14:19 +08:00
parent 58776505f9
commit 2922fb0e27

View File

@ -131,6 +131,9 @@ class QJsonModel(QtCore.QAbstractItemModel):
self._rootItem = QJsonTreeItem()
self._headers = ("key", "value")
def clear(self):
self.load({})
def load(self, document):
"""Load from dictionary