Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. QListWidgetItem.setData(Qt::UserRole + 1, QFileInfo)
Forum Update on Monday, May 27th 2025

QListWidgetItem.setData(Qt::UserRole + 1, QFileInfo)

Scheduled Pinned Locked Moved Unsolved General and Desktop
3 Posts 3 Posters 404 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • sonichyS Offline
    sonichyS Offline
    sonichy
    wrote on last edited by
    #1

    File Manager need save QFileInfo in QListWidgetItem, can it be realized ?

    https://github.com/sonichy

    jsulmJ 1 Reply Last reply
    0
    • sonichyS sonichy

      File Manager need save QFileInfo in QListWidgetItem, can it be realized ?

      jsulmJ Offline
      jsulmJ Offline
      jsulm
      Lifetime Qt Champion
      wrote on last edited by
      #2

      @sonichy Subclass QListWidgetItem

      https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      1
      • mrjjM Offline
        mrjjM Offline
        mrjj
        Lifetime Qt Champion
        wrote on last edited by mrjj
        #3

        Hi
        just for info
        It also seems to work this way
        QFileInfo info;
        item.setData( Qt::UserRole + 1, QVariant::fromValue(info) );

        1 Reply Last reply
        1

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved