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. Handling a ListModel
QtWS25 Last Chance

Handling a ListModel

Scheduled Pinned Locked Moved QML and Qt Quick
2 Posts 2 Posters 600 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.
  • M Offline
    M Offline
    mias21
    wrote on last edited by
    #1

    Hi to all,

    I am a beginner on QtQuick, and i need your help about the following problem

    !http://imagizer.imageshack.us/v2/800x600q90/540/fMjzw7.png(Image)!

    as described in the image:

    1. I want to create two circular List [Circular List A] & [Circular List B] ; for this i used a PathView @(could you tell me if using PathView is the best way to create a circular List?@

    2. I want to use a drag on each element on a circular List A so that each element of the List A will be dragged on the list B and will be delete on the A list .
      @For this i do not know how to use a list to handle each element of the list separately.@

    3. @Is it possible to assign to each element of the list an action different to action assigned to other elements when we Use onClicked on every element?@

    someone could give me directions how to do?

    Best Regards;

    Mias21

    1 Reply Last reply
    0
    • p3c0P Offline
      p3c0P Offline
      p3c0
      Moderators
      wrote on last edited by
      #2

      Hi,

      bq. could you tell me if using PathView is the best way to create a circular List?

      Yes. Use the PathView and set it a Model.

      bq. I want to use a drag on each element on a circular List A so that each element of the List A will be dragged on the list B and will be delete on the A list.

      Set a "delegate":http://qt-project.org/doc/qt-5/qml-qtquick-pathview.html#delegate-prop to the PathView and in that Component use "Drag":http://qt-project.org/doc/qt-5/qml-qtquick-drag.html to drag the Items and set also DropArea to the PathViews. And since Model is used you can remove/add Items from the PathView.

      bq. Is it possible to assign to each element of the list an action different to action assigned to other elements when we Use onClicked on every element?

      If a delegate is used you can do it. Each Component of the Delegate is assigned a unique index using which you can use.

      Hope this helps you ...

      157

      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