Forums

OverviewV-Play 2 Support (Qt 5) › Problem creating a PathView

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #9766

    Cal
    I have been trying to get a simple 5 img pathview slider working for the past little
    while now but ca'nt seem to get the thing centered properly. Also my images seem to have
    the tops cut off and the pathview does not center in the window correcly. can someone
    give me some pointers.
    
    GameWindow {
        property int imgHeight:150
        property int imgWidth:165
    
        Backgrounds {}
    
        Scene {
            id: scene
            width: 960
            height: 640
    
            PathView {
                id: view
                width: imgWidth*pathItemCount
                height: imgHeight
                y:25
                anchors.horizontalCenter: parent.horizontalCenter
                cacheItemCount: 2
                pathItemCount: 5
                snapMode: "SnapToItem"
                focus: true
                clip: true
    
                preferredHighlightBegin: .5
                preferredHighlightEnd: .5
                highlightRangeMode: PathView.StrictlyEnforceRange
    
                model: sliderModel
    
                delegate: Image {
                    id: name
                    source: front
                    width: imgWidth
                    height: imgHeight
    
                    Text {
                        text: albumid
                        color:'white'
                    }
                 }
    
                path: Path {
                    startX: view.x
                    startY: view.y
                    PathLine { x: view.x + (imgWidth * view.pathItemCount); y: view.y  }
                }
    
            }
        }
    }
    

     

    #9769

    Christian
    V-Play Team

    This is a general Qt-related question about PathView. Please try to ask in the Qt support forums about it.

    Cheers, Chris

Viewing 2 posts - 1 through 2 (of 2 total)

RSS feed for this thread

You must be logged in to reply to this topic.

Voted #1 for:

  • Easiest to learn
  • Most time saving
  • Best support

Develop Cross-Platform Apps and Games 50% Faster!

  • Voted the best supported, most time-saving and easiest to learn cross-platform development tool
  • Based on the Qt framework, with native performance and appearance on all platforms including iOS and Android
  • Offers a variety of plugins to monetize, analyze and engage users
FREE!
create apps
create games
cross platform
native performance
3rd party services
game network
multiplayer
level editor
easiest to learn
biggest time saving
best support