spacepaste

  1.  
  2. import sys
  3. from PyQt5.QtWidgets import QApplication, QFrame
  4. app = QApplication([])
  5. frame = QFrame()
  6. frame.setAcceptDrops(True)
  7. def f(event):
  8. print('hey')
  9. frame.dragEnterEvent = f
  10. sys.exit(app.exec_())
  11.