View Single Post
Old 02-12-2020, 12:19 PM   #16
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 8,859
Karma: 6120478
Join Date: Nov 2009
Device: many
Snooped a bit more in Qt's online docs ....

In Sigil, a ContentTab inherits from QWidget and according to the docs, if we overload this QWidget routine and ignore the event (controllable by setting a variable) it will not be able to be dragged.

Quote:
if this event is ignored, it will not receive any drag move events.
Code:
void QWidget::dragEnterEvent(QDragEnterEvent * event);
So we could add a enableDrag() and disableDrag() routine to ContentTab.cpp and then overload this routine and enable individual tab drag and drop behaviour.

And then every time a new tab becomes the current tab, we enable it and disable all of the others, so that only a current tab will be draggable (at least in theory!).

So it should be doable.

KevinH
KevinH is offline   Reply With Quote