so far I came up with this script

i am not sure why it is not giving me desired result


**

 *    def changePriority(self,*args):
        crntRow = self.listWidget.currentRow()
        total=self.listWidget.count()

        print "Total no. of items %s, and selected item number is
%s"%(total,crntRow)
        if args[0]=='up':
           if crntRow > 0 :
              crntItem= self.listWidget.takeItem(crntRow)
              self.listWidget.insertItem(crntRow+1,crntItem)
        if args[0]=='down':
           if crntRow + 1  < total:
              crntItem=self.listWidget.takeItem(crntRow)
              sel.listWidget.insertItem(crntRow-1,crntItem)
           else: print "This is the last item cannot move down further."
*
what is wrong , instead of moving up it gets removed...
_______________________________________________
PyQt mailing list    PyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt

Reply via email to