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. Repaint QListWidget's icons when resizing
Qt 6.11 is out! See what's new in the release blog

Repaint QListWidget's icons when resizing

Scheduled Pinned Locked Moved Unsolved General and Desktop
2 Posts 2 Posters 239 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.
  • D Offline
    D Offline
    Dvassily
    wrote on last edited by
    #1

    Hello.

    I have a problem with a QListWidget in icon mode : at startup, the icons are painted so as they take the maximal width of the widget. But when the QListWidget is resized, the icons keep the same location whereas there is more available horizontal space to dispose them. Is this a normal behaviour of QListWidget? Is there any way to draw the icons again when the widget is resized?

    Dvassily.

    1 Reply Last reply
    0
    • Christian EhrlicherC Online
      Christian EhrlicherC Online
      Christian Ehrlicher
      Lifetime Qt Champion
      wrote on last edited by
      #2

      The behavior is correct - or does e.g. your file explorer automatically resizes the icons when there is more spaces available.
      I think you're looking for QListView::gridSize(). Make sure the icons you use are available in the desired size.

      Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
      Visit the Qt Academy at https://academy.qt.io/catalog

      1 Reply Last reply
      2

      • Login

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