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. QListView horizontal
Qt 6.11 is out! See what's new in the release blog

QListView horizontal

Scheduled Pinned Locked Moved Unsolved General and Desktop
5 Posts 3 Posters 4.4k Views 3 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.
  • D Offline
    D Offline
    devarde
    wrote on last edited by
    #1

    I am trying to do a horizontal QListView - a QListView with the items side-by-side instead of top-to-bottom. Though I don't know how to do it in such form that when the items reach the right edge screen the keep up in the same direction and a horizontal scrollbar shows up. In sum: I need a QListView horizontal that have just one line of content and the horizontal scrollbar appears as needed.

    Any ideas?

    Thanks beforehand.

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      Are you thinking about something like the flow property ?

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

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

        I saw that property, but I don't know how to enforce that QListView always have the same height and just vary the width. I don't know if help but the QListView find itself inside of a QDockWidget when this widget is on top and on bottom of screen.

        1 Reply Last reply
        0
        • mrjjM Offline
          mrjjM Offline
          mrjj
          Lifetime Qt Champion
          wrote on last edited by
          #4

          hi
          If u set flow to LeftToRight , it seems to do as u ask for.
          http://postimg.org/image/80ywr588j/
          :)

          1 Reply Last reply
          0
          • SGaistS Offline
            SGaistS Offline
            SGaist
            Lifetime Qt Champion
            wrote on last edited by
            #5

            If all your elements have the same size you could set the grid size

            Interested in AI ? www.idiap.ch
            Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

            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