Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre > Development

Notices

Reply
 
Thread Tools Search this Thread
Old 03-14-2026, 01:18 PM   #1
varia
Enthusiast
varia can spell AND pronounce 'liseuse.'varia can spell AND pronounce 'liseuse.'varia can spell AND pronounce 'liseuse.'varia can spell AND pronounce 'liseuse.'varia can spell AND pronounce 'liseuse.'varia can spell AND pronounce 'liseuse.'varia can spell AND pronounce 'liseuse.'varia can spell AND pronounce 'liseuse.'varia can spell AND pronounce 'liseuse.'varia can spell AND pronounce 'liseuse.'varia can spell AND pronounce 'liseuse.'
 
varia's Avatar
 
Posts: 46
Karma: 39844
Join Date: Jan 2026
Device: Samsung Galaxy Tab S10 Lite
Drag and Drop

Hello,

What is the trick to getting drag and drop in a list to stick?

This is the code I am using: self.challenge_list.setDragDropMode(self.challenge _list.InternalMove)

I can move but everything reverts after refreshing/restarting.

Thanks.
Attached Thumbnails
Click image for larger version

Name:	drag-drop.png
Views:	25
Size:	23.7 KB
ID:	221765  

Last edited by varia; 03-14-2026 at 01:20 PM.
varia is offline   Reply With Quote
Old 03-14-2026, 03:57 PM   #2
dunhill
Wizard
dunhill ought to be getting tired of karma fortunes by now.dunhill ought to be getting tired of karma fortunes by now.dunhill ought to be getting tired of karma fortunes by now.dunhill ought to be getting tired of karma fortunes by now.dunhill ought to be getting tired of karma fortunes by now.dunhill ought to be getting tired of karma fortunes by now.dunhill ought to be getting tired of karma fortunes by now.dunhill ought to be getting tired of karma fortunes by now.dunhill ought to be getting tired of karma fortunes by now.dunhill ought to be getting tired of karma fortunes by now.dunhill ought to be getting tired of karma fortunes by now.
 
dunhill's Avatar
 
Posts: 1,070
Karma: 1084520
Join Date: Sep 2017
Location: Buenos Aires, Argentina
Device: moon+ reader, kindle paperwhite
Check

Code:
self.challenge_list.setDragDropMode(QAbstractItemView.InternalMove)
self.challenge_list.setDefaultDropAction(Qt.MoveAction)

class ChallengeList(QListWidget):
    def dropEvent(self, event):
        super().dropEvent(event)
        # Capture the new order
        order = [self.item(i).text() for i in range(self.count())]
        print("New order:", order)
        # Save 'order' to your config or model here
dunhill is offline   Reply With Quote
Old 03-14-2026, 07:39 PM   #3
varia
Enthusiast
varia can spell AND pronounce 'liseuse.'varia can spell AND pronounce 'liseuse.'varia can spell AND pronounce 'liseuse.'varia can spell AND pronounce 'liseuse.'varia can spell AND pronounce 'liseuse.'varia can spell AND pronounce 'liseuse.'varia can spell AND pronounce 'liseuse.'varia can spell AND pronounce 'liseuse.'varia can spell AND pronounce 'liseuse.'varia can spell AND pronounce 'liseuse.'varia can spell AND pronounce 'liseuse.'
 
varia's Avatar
 
Posts: 46
Karma: 39844
Join Date: Jan 2026
Device: Samsung Galaxy Tab S10 Lite
Thanks Dunhill. Hopefully now I'm on track. Now just need to iron out some buginess with drag/drop in general.
varia is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Drag and drop text in 2.0.0 StephV Sigil 35 09-10-2023 11:52 AM
No more Drag and Drop? hard_boiled Library Management 14 09-29-2013 07:44 PM
Touch Drag and Drop fails. edu500ac Kobo Reader 8 09-25-2012 05:28 AM
Drag 'n' Drop Perkin Calibre 17 10-06-2010 11:46 AM
Drag and Drop jjjconnon Calibre 11 02-27-2010 11:59 PM


All times are GMT -4. The time now is 12:23 PM.


MobileRead.com is a privately owned, operated and funded community.