Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. Draggable Listview
Qt 6.11 is out! See what's new in the release blog

Draggable Listview

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
6 Posts 2 Posters 642 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
    St.Stanislav
    wrote on last edited by
    #1

    Hello everyone!

    Maybe it will be a stupid question, but how to restrict draggable ListView behaviour? Maybe it was stated somewhere, but I cannot find good practice approach. I want to make ListView scrollable only by mouse wheel or ScrollBar without draggable behaviour.

    1 Reply Last reply
    0
    • fcarneyF Offline
      fcarneyF Offline
      fcarney
      wrote on last edited by
      #2

      Look at the docs. ListView is based upon Flickable.

      C++ is a perfectly valid school of magic.

      S 1 Reply Last reply
      0
      • fcarneyF fcarney

        Look at the docs. ListView is based upon Flickable.

        S Offline
        S Offline
        St.Stanislav
        wrote on last edited by
        #3

        @fcarney I know about interactive, but it disables scrolling by mouse and by scrollbar. Should Scrollbar be added manually within this approach?

        1 Reply Last reply
        0
        • fcarneyF Offline
          fcarneyF Offline
          fcarney
          wrote on last edited by
          #4

          @St-Stanislav said in Draggable Listview:

          Should Scrollbar be added manually within this approach?

          I have listviews that I turn interactive off with. I then add ScrollBar.vertical: ScrollBar{/* settings */}

          C++ is a perfectly valid school of magic.

          S 1 Reply Last reply
          0
          • fcarneyF fcarney

            @St-Stanislav said in Draggable Listview:

            Should Scrollbar be added manually within this approach?

            I have listviews that I turn interactive off with. I then add ScrollBar.vertical: ScrollBar{/* settings */}

            S Offline
            S Offline
            St.Stanislav
            wrote on last edited by
            #5

            @fcarney Sorry for the long reply. With this approach ScrollBar can be used for the scrolling well enough. But mouse wheel is inactive. Should the MouseArea be added manually?

            Honestly, I ask about this straightforward (and evident) things, because cannot belive that simple disabling draggable behaviour is accompanied by so many additional things.

            1 Reply Last reply
            0
            • fcarneyF Offline
              fcarneyF Offline
              fcarney
              wrote on last edited by
              #6

              @St-Stanislav said in Draggable Listview:

              But mouse wheel is inactive.

              I just checked my listviews and mouse wheel doesn't seem to work. I honestly don't know if they worked before or not. Do they work with Interactive set to true?

              The problem with QML is the newer objects are designed around tablet/phone paradigm. So it is not always good fit for desktop. Or it takes extra work. Please let us know what you find out implementing mouse scroll wheel in a list with interactive off.

              C++ is a perfectly valid school of magic.

              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