code: def dragEnterEvent(self, event):
          
          source = event.mimeData()
          # The second check is necessary on Windows, where source.hasUrls()
          # can return True but source.urls() is []
          # The third check is needed since a file could be dropped from
          # compressed files. In Windows mimedata2url(source) returns None
          # Fixes issue 5218
          if source.hasUrls() and source.urls() and mimedata2url(source):
              all_urls = mimedata2url(source)
              text = [encoding.is_text_file(url) for url in all_urls]
              if any(text):
                  event.acceptProposedAction()
              else:
                  event.ignore()
          elif source.hasText():
              event.acceptProposedAction()
          elif os.name == 'nt':
              # This covers cases like dragging from compressed files,
              # which can be opened by the Editor if they are plain
              # text, but doesn't come with url info.
              # Fixes Issue 2032
              event.acceptProposedAction()
          else:
              event.ignore()
docs: Reimplement Qt method
          Inform Qt about the types of data that the widget accepts