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 camera or complete screen in QML
QtWS25 Last Chance

Moving camera or complete screen in QML

Scheduled Pinned Locked Moved QML and Qt Quick
8 Posts 4 Posters 3.5k 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.
  • F Offline
    F Offline
    farrukh.arshad
    wrote on last edited by
    #1

    Greetings All,

    I am new in QML. I want to create a screen transition similar to Android home screen. For example on Android home screen there are total 3 or 5 home screens which can be changed by dragging your finger towards left or right. My question is

    Is this possible in QML
    Any pointer to start is highly appreciated.

    Best Regards,
    Farrukh Arshad.

    1 Reply Last reply
    0
    • G Offline
      G Offline
      GentooXativa
      wrote on last edited by
      #2

      Try with a ListView containing all the Pages you need on it, and add a Animation

      Jose Vicente Giner Sanchez - Senior Mobile Developer

      www.gigigo.com

      C/ Dr. Zamenhof 36bis, 1ºA 28027 Madrid
      T: +34 917431436

      1 Reply Last reply
      0
      • D Offline
        D Offline
        dajansen
        wrote on last edited by
        #3

        Agreed. ListView (orientation: ListView.Horizontal) with possibly a VisualItemModel.
        Create each of your pages as a separate "delegate" in the model.
        http://doc.qt.nokia.com/4.7-snapshot/qml-visualitemmodel.html

        QtQuick Quality Engineer / Lab Monkey
        Nokia Brisbane

        1 Reply Last reply
        0
        • F Offline
          F Offline
          farrukh.arshad
          wrote on last edited by
          #4

          Thanks guys, This ListView + VisualItemModel does seems to provide what I am looking for. VisualItemModel also has a similar example. I will update the thread once I will implement it.

          1 Reply Last reply
          0
          • R Offline
            R Offline
            Rocken
            wrote on last edited by
            #5

            Maybe "this":http://www.developer.nokia.com/Community/Wiki/Implementing_a_simple_View_Manager_with_QML is what you're searching for?
            "This":http://www.developer.nokia.com/Community/Wiki/QML_paging_using_ListView could also be interesting.

            1 Reply Last reply
            0
            • F Offline
              F Offline
              farrukh.arshad
              wrote on last edited by
              #6

              I have tried the ListView with ListViewModel and that is giving me what I want. An example is shown at this link as well

              http://doc.qt.nokia.com/4.7-snapshot/declarative-modelviews-visualitemmodel.html

              My second question is that "Is it possible to dynamically change the orientation of the ListView" ?

              The reason is, I am trying to achieve screen scrolling at vertical as well as horizontal direction. What I want to achieve is that suppose I have three screens 1, 2, 3 & 3 more screens A, B, C. If I scroll in Horizontal (X direction) only the I should switch between 1,2,3 and if scroll in Vertical (Y direction) I should switch between A, B, C.

              From ListViewModel perspective I think I can place these 6 six screens in one model and depending on the index I can show what screen I want, but I can not seems to change orientation on the go (say I have calculated a line points in mouse movement and if the slope of the line is horizontal I decided to scroll in orientation = ListView.Horizontal and if the slope of the line is vertical I decide to scroll in orientation = ListView.Vertical.

              Does that seems to make sense. To simplify my question, Can I change orientation of ListView dynamically ?

              I have tried having two ListView both attached with their own ListViewModel (one for horizontal and one for vertical), and I hide and show respective ListView in my scroll movement, that does not seems to help either.

              Do you think this is possible at all ?

              Best Regards
              Farrukh.

              1 Reply Last reply
              0
              • R Offline
                R Offline
                Rocken
                wrote on last edited by
                #7

                Maybe you can put a ListBox for vertical srolling as item inside the listbox which scrolls horizontally. If you want to scroll vertical in each horizontal item, you have to put a vertical scrolling ListBox in each item of the horizontal scrolling ListBox. Have you tried using the GridView?

                1 Reply Last reply
                0
                • F Offline
                  F Offline
                  farrukh.arshad
                  wrote on last edited by
                  #8

                  Thanks Rocken, Though in broken condition but this does seems to have potential to work. I have created a component of ListViewModel & ListView for horizontal scrolling, then created another ListViewModel & ListView for vertical scrolling. The vertical scrolling ListViewModel contains the component of horizontal scrolling ListView. Let me refine it then post the solution here.

                  Again thanks.

                  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