Results 1 to 15 of 15

Thread: failed to assigned loader source component

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #6
    Join Date
    Oct 2014
    Posts
    104
    Qt products
    Qt5
    Platforms
    Unix/X11 Windows
    Thanks
    16
    Thanked 1 Time in 1 Post

    Default Re: failed to assigned loader source component

    I have found this signal onMovementStarted to trigger the changing of loader source.
    However I need to know if the user swipe to right before it changes the source.
    Is this a correct way to trigger the change of page or there's a better option.
    Any suggestions? Thanks

    Qt Code:
    1. ListView {
    2. id: wizardList
    3. anchors.fill: parent
    4. focus: true
    5. highlightRangeMode: ListView.StrictlyEnforceRange
    6. orientation: ListView.Horizontal
    7. snapMode: ListView.SnapOneItem
    8. model:
    9. ListModel {
    10. ListElement {
    11. page: "Wizard1.qml"
    12. }
    13. ListElement {
    14. page: "Wizard2.qml"
    15. }
    16. ListElement {
    17. page: "Wizard3.qml"
    18. }
    19. }
    20. delegate: WizardDelegate {}
    21. onMovementStarted: {
    22. if (wizardList.currentIndex == 2) { // i need to include in the condition to check if the swipe direction is to the right
    23. mainLoader.source = "Main.qml"
    24. }
    25.  
    26. }
    27. }
    To copy to clipboard, switch view to plain text mode 
    Last edited by joko; 9th January 2015 at 15:07.

Similar Threads

  1. update Loader source
    By codeman in forum Qt Quick
    Replies: 1
    Last Post: 25th July 2014, 16:21
  2. Geotechnical engineer and I have been assigned
    By Jackson Kulakowski in forum Qt Programming
    Replies: 1
    Last Post: 2nd June 2013, 18:22
  3. Replies: 2
    Last Post: 25th March 2013, 18:06
  4. Replies: 1
    Last Post: 23rd February 2013, 17:05
  5. Replies: 0
    Last Post: 23rd November 2011, 18:56

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.