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, 02:18 PM   #1
varia
Connoisseur
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: 67
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:	106
Size:	23.7 KB
ID:	221765  

Last edited by varia; 03-14-2026 at 02:20 PM.
varia is offline   Reply With Quote
Old 03-14-2026, 04: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,215
Karma: 1513034
Join Date: Sep 2017
Location: Buenos Aires, Argentina
Device: moon+ reader, kindle paperwhite, Linux Mint
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, 08:39 PM   #3
varia
Connoisseur
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: 67
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 12:52 PM
No more Drag and Drop? hard_boiled Library Management 14 09-29-2013 08:44 PM
Touch Drag and Drop fails. edu500ac Kobo Reader 8 09-25-2012 06:28 AM
Drag 'n' Drop Perkin Calibre 17 10-06-2010 12:46 PM
Drag and Drop jjjconnon Calibre 11 02-28-2010 12:59 AM


All times are GMT -4. The time now is 11:49 AM.


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