Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-61602

QAbstractItemModel::supportedDragActions doesn't work by default

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Not Evaluated
    • 5.9.1
    • 5.9.0
    • Widgets: Itemviews
    • None
    • Win 7 SP1, Visual Studio 2015
    • f33cf18d882ada727da0f378525e55d9421e3b16

    Description

      Quote from Qt Core 5.9 documentation:

      [virtual] Qt::DropActions QAbstractItemModel::supportedDragActions() const

      Returns the actions supported by the data in this model.

      The default implementation returns supportedDropActions(). Reimplement this function if you wish to support additional actions.

      supportedDragActions initialize as -1 in QAbstractItemModelPrivate::QAbstractItemModelPrivate

      Qt 5.9.0 default implementation:

      Qt::DropActions QAbstractItemModel::supportedDragActions() const
       {
       Q_D(const QAbstractItemModel);
       if (d->supportedDragActions != *Qt::IgnoreAction*)
       return d->supportedDragActions;
       return supportedDropActions();
       }
      

      Qt 5.8.0 default implementation:

      Qt::DropActions QAbstractItemModel::supportedDragActions() const
       {
       Q_D(const QAbstractItemModel);
       if (d->supportedDragActions != *-1*)
       return d->supportedDragActions;
       return supportedDropActions();
       }
      

      supportedDragActions() doesn't work by default.

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            mmutz Marc Mutz
            sargtlin Kozlov Ilya
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes