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. How to switch view using a button
Qt 6.11 is out! See what's new in the release blog

How to switch view using a button

Scheduled Pinned Locked Moved QML and Qt Quick
14 Posts 6 Posters 10.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.
  • ? Offline
    ? Offline
    A Former User
    wrote on last edited by
    #4

    list button is just a normal button.
    for example I create a button that have introduction text on it.
    when we click that button it will direct to the introduction part

    1 Reply Last reply
    0
    • D Offline
      D Offline
      DenisKormalev
      wrote on last edited by
      #5

      Just make Image with Text and MouseArea inside it and set needed action for MouseArea.onClicked

      1 Reply Last reply
      0
      • ? Offline
        ? Offline
        A Former User
        wrote on last edited by
        #6

        ok.. so that image should be direct to where..
        is it state or something else

        1 Reply Last reply
        0
        • ? Offline
          ? Offline
          A Former User
          wrote on last edited by
          #7

          You can use "states" for display your pages. And your "list button" can be globally or page-only.

          1 Reply Last reply
          0
          • ? Offline
            ? Offline
            A Former User
            wrote on last edited by
            #8

            Hey, I think it i better to start with simple things to understand how QML works.
            I would recommend checking and trying examples "here":http://jryannel.wordpress.com/

            Really good learning curve.

            Also very nice materials here on this site in section for designers: "here":http://qt.nokia.com/developer/learning/online/training/materials/qt-quick-for-designers/

            1 Reply Last reply
            0
            • A Offline
              A Offline
              andre
              wrote on last edited by
              #9

              Indeed. Wise advice by cmer4.

              1 Reply Last reply
              0
              • ? Offline
                ? Offline
                A Former User
                wrote on last edited by
                #10

                Hello,
                How can I switch view in qml

                1 Reply Last reply
                0
                • ? Offline
                  ? Offline
                  A Former User
                  wrote on last edited by
                  #11

                  thank you

                  1 Reply Last reply
                  0
                  • ? Offline
                    ? Offline
                    A Former User
                    wrote on last edited by
                    #12

                    Sorry, what are you mean "switch view", can you give us a more detailed description about this ?

                    1 Reply Last reply
                    0
                    • ? Offline
                      ? Offline
                      A Former User
                      wrote on last edited by
                      #13

                      for example I want to create a button and will direct me from view 1 to view 2

                      1 Reply Last reply
                      0
                      • J Offline
                        J Offline
                        Jens
                        wrote on last edited by
                        #14

                        There are many ways to do this. For a transition from left to right you can create a row layout and put two screens next to each other. Then you simply shift the x-coordinate by one negative screen width. For a cross-fade transition you put two items on top of each other and you set the opacity of the topmost one to 0. I would recommend using a Behavior or Animation to ease out the transition for opacity or x coordinates. There is not a standard way of doing this in Qt Quick but I would recommend looking at examples such as the flickr demo.

                        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