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

mouseMoveEvent ignored in QGraphicsView if frame shape is set to NoFrame

    XMLWordPrintable

Details

    Description

      If I create a QGraphicsView subclass with custom mouseMoveEvent code, events are no longer received if I set view.setFrameShape(QFrame.NoFrame). I have this bug in PyQt, but I presume the actual problem is with Qt.

      Example PyQt4 session:

      >>> from PyQt4 import QtGui
      >>> app = QtGui.QApplication([])
      >>> def callback(*args):
      ... print "move"
      ...
      >>> gv = QtGui.QGraphicsView()
      >>> gv.mouseMoveEvent = callback
      >>> gv.show() ## now drag mouse over the view and messages are generated
      move
      move
      ...
      move
      >>> gv.setFrameShape(QtGui.QFrame.NoFrame)

        1. now drag mouse over the view, messages are no longer generated

      Attachments

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

        Activity

          People

            Unassigned Unassigned
            lcampagn Luke
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes