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. Moving direction in PathView
Forum Updated to NodeBB v4.3 + New Features

Moving direction in PathView

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

    Hello everyone,

    I am developing one GUI app with QML.
    In PathView, I have one problem about moving direction.

    I designed the pathview as following.
    In basic PathView, we can scroll items with mouse dragging.
    When I drag(left->right) it clicking bottom area of front delegate, it moves in proper direction. (left->right)
    But When I drag(left->right) it clicking top area of front delegate, it moves in the opposite direction. (right->left)
    I hope that front delegate always moves in proper direction as dragging direction.

    Could you give me a suggestion?
    Thanks.

    @ /* App Category Model for Path View */
    ListModel {
    id: lAppItemModel
    ListElement {
    name: "Games"
    icon: "../images/cf_app/cf_app_category_app_01.png"
    }
    ListElement {
    name: "Car"
    icon: "../images/cf_app/cf_app_category_app_02.png"
    }
    ListElement {
    name: "Entertainment"
    icon: "../images/cf_app/cf_app_category_app_03.png"
    }
    }

    /* Item Delegate of App Category */
    Component {
        id: app_delegate
    
        Column {
            id: app_item_wrapper
            z: PathView.z
            scale: PathView.iconScale
    
            Image {
                id: img_a
                width: 198
                height: 140
                source: icon
                smooth: true
            }
        }
    }
    
    /* App Category PathView */
    PathView {
        id: home_menu_path_view
        anchors.fill: parent
        model: lAppItemModel
        delegate: app_delegate
        path: Path {
            startX: 308; startY: 116
            PathAttribute { name: "iconScale"; value: 1.0 }
            PathAttribute { name: "z"; value: 100}
            PathLine{x: 138;y: 107}
            PathPercent { value: 0.33 }
            PathAttribute { name: "iconScale"; value: 0.67 }
            PathAttribute { name: "z"; value: 50}
            PathLine{x: 477;y: 107}
            PathPercent { value: 0.66 }
            PathAttribute { name: "iconScale"; value: 0.67 }
            PathAttribute { name: "z"; value: 50}
            PathLine{x: 308;y: 116}
            PathPercent { value: 1.0 }
            PathAttribute { name: "iconScale"; value: 1.0 }
            PathAttribute { name: "z"; value: 100}
        }
    }@
    
    1 Reply Last reply
    0
    • A Offline
      A Offline
      andre
      wrote on last edited by
      #2

      I have run into this too. You have most issues with it if you have a short list of items. See "this":https://bugreports.qt.nokia.com/browse/QTBUG-15314 bugreport.

      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