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. DecorationRole Icon spacing issues
Qt 6.11 is out! See what's new in the release blog

DecorationRole Icon spacing issues

Scheduled Pinned Locked Moved General and Desktop
2 Posts 2 Posters 2.6k Views 1 Watching
  • 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.
  • S Offline
    S Offline
    scumpyt
    wrote on last edited by
    #1

    I have have a bunch of different-sized icons that I'm using as the DecorationRole in a QListView.

    I can't seem to figure out to ensure that all the Icons take up the same amount of space. To explain that a little better, what I really want is to set up the spacing such that all my DecorationRole icons occupy the same width and height, regardless of their actual size.

    I tried QListView::setSpacing() and QAbstractItemView::setIconSizes(), but they didn't help.

    Anybody have any other ideas?

    Thanks in advance...

    1 Reply Last reply
    0
    • ? Offline
      ? Offline
      A Former User
      wrote on last edited by
      #2

      Hello,

      Idea : Use an icon with the maximal size needed.

      PS : What type of class Model you are use ?

      Regards

      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