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. Edit the icon of QListWidgetItem
QtWS25 Last Chance

Edit the icon of QListWidgetItem

Scheduled Pinned Locked Moved General and Desktop
5 Posts 3 Posters 1.8k 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.
  • L Offline
    L Offline
    lin-unix
    wrote on last edited by
    #1

    Is there anyway to allow a user to edit an icon in a QListWidgetItem displayed in a QListWidget?

    1 Reply Last reply
    0
    • A Offline
      A Offline
      andre
      wrote on last edited by
      #2

      Edit how? You'll have to be more specific in what you want to achieve. The general answer is "yes" though. See for instance that in QtDesigner it is possible to modify images in an item view (the property editor is based on an item view).

      1 Reply Last reply
      0
      • N Offline
        N Offline
        Neutron Stein
        wrote on last edited by
        #3

        I think yes.

        Never Seen !

        1 Reply Last reply
        0
        • L Offline
          L Offline
          lin-unix
          wrote on last edited by
          #4

          Sorry, I should have asked if an image can be edited in a similar way as the text of an item can.

          It would be nice if the icon in a QListWidgetItem acted like a QPushButton where, when clicked, a dialog would appear with a variety of images that the user could choose to use as the icon.

          Is something like this possible or ever something similar?

          1 Reply Last reply
          0
          • A Offline
            A Offline
            andre
            wrote on last edited by
            #5

            Well, that's not all that of a similar way of editing as you can with a string, is it?

            But yes, that is possible. You'll need to create your own editor for this though. See [[doc:QItemEditorFactory]] as a starting point.

            1 Reply Last reply
            0

            • Login

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