Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Edit the icon of QListWidgetItem

    General and Desktop
    3
    5
    1529
    Loading More Posts
    • 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
      lin-unix last edited by

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

      1 Reply Last reply Reply Quote 0
      • A
        andre last edited by

        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 Reply Quote 0
        • N
          Neutron Stein last edited by

          I think yes.

          Never Seen !

          1 Reply Last reply Reply Quote 0
          • L
            lin-unix last edited by

            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 Reply Quote 0
            • A
              andre last edited by

              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 Reply Quote 0
              • First post
                Last post