thanks justin.. its working.. is there any way to emit a signal, when i drop and item to a list-widget? so tat i can use that signal for another function call
thanks.. On Thursday, 26 June 2014 17:17:15 UTC+5:30, Justin Israel wrote: > > QListWidget has a lot of the drag and drop functionality already defined, > so it is just a few features that have to be enabled: > > class DragDrop(QtGui.QWidget): > > def __init__(self): > super(DragDrop, self).__init__() > > self.list1 = QtGui.QListWidget() > self.list1.setDragEnabled(True) > self.list1.setDropIndicatorShown(True) > self.list1.setDragDropMode(self.list1.DragDrop) > self.list1.setDefaultDropAction(QtCore.Qt.MoveAction) > > self.list2 = QtGui.QListWidget() > self.list2.setDragEnabled(True) > self.list2.setDropIndicatorShown(True) > self.list2.setDragDropMode(self.list1.DragDrop) > self.list2.setDefaultDropAction(QtCore.Qt.MoveAction) > > self.list1.addItems(["Item%02d" % i for i in xrange(5)]) > > layout = QtGui.QHBoxLayout(self) > layout.addWidget(self.list1) > layout.addWidget(self.list2) > > > > > > > On Thu, Jun 26, 2014 at 9:51 PM, Rishis3D <[email protected] <javascript:> > > wrote: > >> Hi Guys.. >> >> how to drag and drop and item from one widget to another widget.. eg i >> have multiple qlistwidget.. i want to drag an item from one qlistwidget to >> another qlistwidget.. >> >> thanks, >> rishis3d >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Python Programming for Autodesk Maya" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to [email protected] <javascript:>. >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/python_inside_maya/f39d0041-fb02-41ce-8978-94b8e2b6e3c0%40googlegroups.com >> >> <https://groups.google.com/d/msgid/python_inside_maya/f39d0041-fb02-41ce-8978-94b8e2b6e3c0%40googlegroups.com?utm_medium=email&utm_source=footer> >> . >> For more options, visit https://groups.google.com/d/optout. >> > > -- You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/e917c470-64e6-4457-8ffc-28b03f790f75%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
