spinetoolbox.widgets.custom_qlistview

Classes for custom QListView.

author:
  1. Marin (KTH)
date:

14.11.2018

Module Contents

Classes

DragListView Custom QListView class with dragging support.
ProjectItemDragListView Custom QListView class with dragging support.
class spinetoolbox.widgets.custom_qlistview.DragListView(parent)[source]

Bases: PySide2.QtWidgets.QListView

Custom QListView class with dragging support.

parent

The parent of this view

Type:QWidget

Initialize the view.

mousePressEvent(self, event)[source]

Register drag start position

mouseMoveEvent(self, event)[source]

Start dragging action if needed

mouseReleaseEvent(self, event)[source]

Forget drag start position

class spinetoolbox.widgets.custom_qlistview.ProjectItemDragListView(parent)[source]

Bases: spinetoolbox.widgets.custom_qlistview.DragListView

Custom QListView class with dragging support.

parent

The parent of this view

Type:QWidget

Initialize the view.

set_orientation(self, orientation)[source]
updateGeometries(self)[source]

Resize to contents.