def RecentPath_asqstandarditem(pathitem):
    icon_provider = QFileIconProvider()
    # basename of a normalized name (strip right path component separators)
    basename = os.path.basename(os.path.normpath(pathitem.abspath))
    item = QStandardItem(icon_provider.icon(QFileInfo(pathitem.abspath)),
                         basename)
    item.setToolTip(pathitem.abspath)
    item.setData(pathitem, Qt.UserRole)
    return item
def RecentPath_asqstandarditem(pathitem):
    icon_provider = QFileIconProvider()
    # basename of a normalized name (strip right path component separators)
    basename = os.path.basename(os.path.normpath(pathitem.abspath))
    item = QStandardItem(
        icon_provider.icon(QFileInfo(pathitem.abspath)),
        basename
    )
    item.setToolTip(pathitem.abspath)
    item.setData(pathitem, Qt.UserRole)
    return item
예제 #3
0
 def icon(self):
     provider = QFileIconProvider()
     return provider.icon(QFileInfo(self.abspath))
예제 #4
0
 def icon(self):
     provider = QFileIconProvider()
     return provider.icon(QFileInfo(self.abspath))