Use position().toPoint() with Qt 6
This commit is contained in:
parent
d332a6777a
commit
4c028c1659
|
@ -357,7 +357,11 @@ void PlaylistTabBar::dragEnterEvent(QDragEnterEvent *e) {
|
|||
|
||||
void PlaylistTabBar::dragMoveEvent(QDragMoveEvent *e) {
|
||||
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
|
||||
drag_hover_tab_ = tabAt(e->position().toPoint());
|
||||
#else
|
||||
drag_hover_tab_ = tabAt(e->pos());
|
||||
#endif
|
||||
|
||||
if (drag_hover_tab_ != -1) {
|
||||
e->setDropAction(Qt::CopyAction);
|
||||
|
|
|
@ -974,7 +974,12 @@ void PlaylistView::dragMoveEvent(QDragMoveEvent *event) {
|
|||
|
||||
QTreeView::dragMoveEvent(event);
|
||||
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
|
||||
QModelIndex index(indexAt(event->position().toPoint()));
|
||||
#else
|
||||
QModelIndex index(indexAt(event->pos()));
|
||||
#endif
|
||||
|
||||
drop_indicator_row_ = index.isValid() ? index.row() : 0;
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue