title: PyQt5 QListWidget with checkboxes and drag and drop
body: <p>I'm trying to build a PyQt5 app, I'd like to create a list widget whose elements are drag-and-drop-able, but where each widget is also associated with a checkbox.</p>
  
  <p>I can create a drag-and-drop-able <code>QListWidget</code> like so:</p>
  
  <pre><code>import sys
  
  from PyQt5.QtWidgets import QApplication, QListWidget
  
  
  if __name__ == '__main__':
      app = QApplication(sys.argv)
  
      lw = QListWidget()
      for i in range(5):
          text = f'Item {i}'
          lw.addItem(text)
  
      lw.setDragDropMode(lw.InternalMove)
      lw.show()
  
      sys.exit(app.exec_())
  </code></pre>
  
  <p>However, when I try to add checkboxes to each item, the drag and drop functionality seems to break. Drag and drop <em>doesn't work</em> with the below code:</p>
  
  <pre><code>import sys
  
  from PyQt5.QtWidgets import QApplication, QListWidget, QListWidgetItem
  from PyQt5.QtCore import Qt
  
  
  if __name__ == '__main__':
      app = QApplication(sys.argv)
  
      lw = QListWidget()
      for i in range(5):
          text = f'Item {i}'
          item = QListWidgetItem(text)
          item.setFlags(Qt.ItemIsUserCheckable | Qt.ItemIsEnabled)
          lw.addItem(item)
  
      lw.setDragDropMode(lw.InternalMove)  # Drag and drop doesn't work...
      lw.show()
  
      sys.exit(app.exec_())
  </code></pre>
  
  <p>Is there a way to get drag-and-drop-able elements which also each contain a checkbox?</p>
  
  <p>Thanks in advance</p>