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

QVideoWidget not accepting Drop

    XMLWordPrintable

Details

    • Windows

    Description

      Drag and Drop does not work with QVideoWidget. I found the same issue and python workaround here but no bug report: https://stackoverflow.com/questions/70024698/qvideowidget-not-reciving-dropevent-strange-behavior

      My quick C++ version of this to make it work:

      VideoWidget::VideoWidget(QWidget *parent) : QVideoWidget(parent)
      {
          QObject *c = findChild<QWidget*>();
          c->installEventFilter(this);
      }
      
      bool VideoWidget::eventFilter(QObject *obj, QEvent *ev)
      {
          QObject *c = findChild<QWidget*>();
      
          if(obj == c){
              if(ev->type() == QEvent::DragEnter){
                  qDebug()<<"Drag Enter";
                  return true;
              }
              else if(ev->type() == QEvent::DragMove){
                  //qDebug()<<"Drag Move";
                  return true;
              }
              else if(ev->type() == QEvent::Drop){
                  qDebug()<<"Drop";
                  return true;
              }
          }
          return QVideoWidget::eventFilter(obj, ev);
      }
      

       

       

      Attachments

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

        Activity

          People

            padubsky Pavel Dubsky
            rv_dominik_r Qt
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes