Initializes the View ui.

def __initialize_ui(self):
        """
        Initializes the View ui.
        """

        self.viewport().installEventFilter(ReadOnlyFilter(self))

        if issubclass(type(self), QListView):
            super(type(self), self).setUniformItemSizes(True)
        elif issubclass(type(self), QTreeView):
            super(type(self), self).setUniformRowHeights(True)