QTreeView: setting icon for item on dropEvent()
问题 I have a QTreeView class and want to set an icon on the dropEvent() event. See the following example: See the icon for the parent "Users" under the first root "Master Data". I want to drag a user (e.g. "user_a") under the second root "Security Model" under "client_c"/"stakeholder_d" and the user_a should get the same icon as the group (already the case for existing "user_b"). #!/usr/bin/env python3 # coding = utf-8 from PyQt5 import QtWidgets, QtCore, QtGui TXT_CLIENT = "Clients" TXT_STAKEHLD