Qt Forum

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

    Unsolved QListView horizontal

    General and Desktop
    3
    5
    3049
    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.
    • D
      devarde last edited by

      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 Reply Quote 0
      • SGaist
        SGaist Lifetime Qt Champion last edited by

        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 Reply Quote 0
        • D
          devarde last edited by

          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 Reply Quote 0
          • mrjj
            mrjj Lifetime Qt Champion last edited by

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

            1 Reply Last reply Reply Quote 0
            • SGaist
              SGaist Lifetime Qt Champion last edited by

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