Commit d9b5a8f4 authored by Dan Pascu's avatar Dan Pascu

Set drag and drop attributes from designer instead of having them hardcoded

parent f0d576f6
......@@ -694,8 +694,6 @@ class ContactListView(QListView):
def __init__(self, parent=None):
super(ContactListView, self).__init__(parent)
self.setItemDelegate(ContactDelegate(self))
self.setDragEnabled(True)
self.setAcceptDrops(True)
self.setDropIndicatorShown(False)
self.drop_indicator_index = QModelIndex()
self.restore_timer = QTimer(self)
......@@ -871,8 +869,6 @@ class ContactSearchListView(QListView):
def __init__(self, parent=None):
super(ContactSearchListView, self).__init__(parent)
self.setItemDelegate(ContactDelegate(self))
self.setDragEnabled(True)
self.setAcceptDrops(True)
self.setDropIndicatorShown(False)
self.drop_indicator_index = QModelIndex()
......
......@@ -293,6 +293,12 @@
<property name="horizontalScrollBarPolicy">
<enum>Qt::ScrollBarAlwaysOff</enum>
</property>
<property name="dragEnabled">
<bool>true</bool>
</property>
<property name="dragDropMode">
<enum>QAbstractItemView::DragDrop</enum>
</property>
<property name="alternatingRowColors">
<bool>true</bool>
</property>
......@@ -419,6 +425,12 @@
</property>
<item>
<widget class="ContactSearchListView" name="search_list">
<property name="dragEnabled">
<bool>true</bool>
</property>
<property name="dragDropMode">
<enum>QAbstractItemView::DragDrop</enum>
</property>
<property name="alternatingRowColors">
<bool>true</bool>
</property>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment