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

Error of the possibleActions value of the drag event

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P2: Important
    • 5.12.9, 5.15.0 Beta3
    • 5.0.0, 5.14
    • QPA: X11/XCB
    • None
    • Linux/X11
    • Linux/X11
    • cc1d891b8ed1c4f23183e4b06f46e5840a993e35 (qt/qtbase/5.14) 6cfb6519b3c917a474c50f0457d568614a21488b (qt/qtbase/5.12)

    Description

       

      QDrag *drag = new QDrag(button);        
      
      drag->setMimeData(new QMimeData());
      drag->exec(Qt::MoveAction | Qt::CopyAction, Qt::CopyAction);
      
      void MainWindow::dragEnterEvent(QDragEnterEvent *event)
      {
          qDebug() << event->proposedAction() << event->possibleActions();
      }

      As shown in the code, I set the QDrag supported actions to be: Qt::CopyAction | Qt::MoveAction, but when I print "QDragEnterEvent::possibleActions" in another Qt application dragEnterEvent, I only see the output: "QFlags<Qt::DropAction>(CopyAction)"

      Attachments

        For Gerrit Dashboard: QTBUG-75744
        # Subject Branch Project Status CR V

        Activity

          People

            avolkov Alexander Volkov
            zccrs JiDe Zhang
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes