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. Only displaying whole items in a QListView - reduce screen noise by only having whole items visible to the user (e.g. 3 instead of 3 and a bit)

Only displaying whole items in a QListView - reduce screen noise by only having whole items visible to the user (e.g. 3 instead of 3 and a bit)

Scheduled Pinned Locked Moved General and Desktop
4 Posts 2 Posters 1.7k 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
    Dolphin
    wrote on last edited by
    #1

    My application is for people with visual impairment so it would be good minimise on screen noise e.g. that bit of a QListView item that half hangs off the end because an exact number of items do not fit in the list. I have some code that calculates the item size and resizes the listView to only display whole items but with all the variations of content, styling and font/icon size it is not working perfectly. Before I work on it any more I was wondering if there was a simple trick?

    QListview has settings: uniformItemSizes and wordWrap

    QListView also uses - flow, view mode and wrapping(item wrapping) - set by the user.

    1 Reply Last reply
    0
    • sierdzioS Offline
      sierdzioS Offline
      sierdzio
      Moderators
      wrote on last edited by
      #2

      Ah, it's you again :) Hello.

      Setting the view mode to QListView::Snap should snap things to grid - but it probably won't prevent "bits" from being shown. I've never tried this, so I can't really say much more.

      (Z(:^

      1 Reply Last reply
      0
      • D Offline
        D Offline
        Dolphin
        wrote on last edited by
        #3

        Hello :-) How is the weather in Germany????

        In order to use the snap you need a grid which means calculating the size of the grid (not having a grid works everything out nicely just does not remove the extra "bits"). Grid calculation proving tricky, not impossible but it seems sensible to check for a simpler way to reduce possible errors.

        1 Reply Last reply
        0
        • sierdzioS Offline
          sierdzioS Offline
          sierdzio
          Moderators
          wrote on last edited by
          #4

          It's HOT. About 30 degrees centigrade. I know that's not what some people would call scorching, but here it's a lot :)

          (Z(:^

          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