33 #include <QAbstractItemModel>
58 template<
typename Model>
61 #if QT_VERSION >= 0x050000
62 Qt::DropActions Drags_;
63 Qt::DropActions Drops_;
74 template<
typename... Args>
76 :
Model { std::forward<Args> (args)... }
77 #
if QT_VERSION >= 0x050000
78 , Drags_ { Model::supportedDragActions () }
79 , Drops_ { Model::supportedDropActions () }
84 #if QT_VERSION >= 0x050000
85 Qt::DropActions supportedDragActions ()
const override
90 void setSupportedDragActions (Qt::DropActions acts)
95 Qt::DropActions supportedDropActions ()
const override
100 void setSupportedDropActions (Qt::DropActions acts)
Abstracts away differences between Qt4 and Qt5 in model DnD support.
DndActionsMixin(Args &&...args)
Constructs the model passing the arguments to the base constructor.
The human-readable name of the device model (QString).