I am creating A Sortable List in Qt. The Code works perfectly well for Downward Scroll but when i having some issues getting the draggable item after i scroll the list down. I have added some test case screenshot for better understanding




Well this is the test case code
ui->listWidget->addItem("SongOne");
ui->listWidget->addItem("SongTwo");
ui->listWidget->addItem("SongThree");
ui->listWidget->addItem("SongFour");
ui->listWidget->addItem("SongFive");
ui->listWidget->setDragEnabled(true);
ui->listWidget->setAcceptDrops(true);
ui->listWidget->setDropIndicatorShown(true);
ui->listWidget->viewport()->setAcceptDrops(true);
ui->listWidget->addItem("SongOne");
ui->listWidget->addItem("SongTwo");
ui->listWidget->addItem("SongThree");
ui->listWidget->addItem("SongFour");
ui->listWidget->addItem("SongFive");
ui->listWidget->setDragDropMode(QAbstractItemView::InternalMove);
ui->listWidget->setDragEnabled(true);
ui->listWidget->setAcceptDrops(true);
ui->listWidget->setDropIndicatorShown(true);
ui->listWidget->viewport()->setAcceptDrops(true);
ui->listWidget->setSelectionMode(QAbstractItemView::SingleSelection);
To copy to clipboard, switch view to plain text mode
Thankz for taking the time in reading my post. Do help me if you have any hint on what i am missing out.I think i am missing setting some property. In the main Program(not the test code), i tried rewriting the `dragMoveEvent` and few more method, but no use.
Bookmarks