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. Swipe View Problem
Forum Update on Monday, May 27th 2025

Swipe View Problem

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
10 Posts 3 Posters 3.0k 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.
  • M Offline
    M Offline
    Mr .Wu
    wrote on last edited by
    #1

    I used swipe view control in the qml . I found that when I slide a page . the ui will carlton between two pages .

    E 1 Reply Last reply
    0
    • M Mr .Wu

      I used swipe view control in the qml . I found that when I slide a page . the ui will carlton between two pages .

      E Offline
      E Offline
      Eeli K
      wrote on last edited by
      #2

      @Mr-.Wu What is carlton? Anyways, it would help if you gave self-contained example code which we could test.

      1 Reply Last reply
      0
      • LorenzL Offline
        LorenzL Offline
        Lorenz
        wrote on last edited by
        #3

        Hi,

        Can you post a code example?

        Check out this code sample which demonstrates the basic use of a SwipeView. It uses the V-Play SDK, but the concept also applies to standard Qt SwipeViews.

        Best,
        Lorenz

        Developer @ V-Play Engine - http://v-play.net/qt

        V-Play simplifies

        • Game Development with Qt
        • Mobile App Dev with Qt esp. iOS & Android

        What others say
        V-Play scored #1 in Cross-Platform App Development Tools Report - see why: https://goo.gl/rgp3rq

        M 2 Replies Last reply
        0
        • LorenzL Lorenz

          Hi,

          Can you post a code example?

          Check out this code sample which demonstrates the basic use of a SwipeView. It uses the V-Play SDK, but the concept also applies to standard Qt SwipeViews.

          Best,
          Lorenz

          M Offline
          M Offline
          Mr .Wu
          wrote on last edited by
          #4

          @Lorenz @Eeli-K There have only one qml file . Like this :

          import QtQuick 2.7
          import QtQuick.Controls 2.0
          import QtQuick.Layouts 1.0

          ApplicationWindow {
          visible: true
          width: 240
          height: 240
          title: qsTr("Hello World")
          flags: Qt.FramelessWindowHint

          SwipeView {
              id: swipeView
              anchors.fill: parent
              currentIndex: 0
          
              Page {
                  Rectangle
                  {
                      color: "red"
                      anchors.fill: parent
                  }
              }
              Page {
                  Rectangle
                  {
                      color: "yellow"
                      anchors.fill: parent
                  }
              }
              Page {
                  Rectangle
                  {
                      color: "blue"
                      anchors.fill: parent
                  }
              }
              Page {
                  Label {
                      text: qsTr("Second page")
                      anchors.centerIn: parent
                  }
              }
          }
          
          /*
          footer: TabBar {
              id: tabBar
              currentIndex: swipeView.currentIndex
              TabButton {
                  text: qsTr("First")
              }
              TabButton {
                  text: qsTr("Second")
              }
          }
          */
          

          }

          when I running on pc . it's ok . but when i running at arm device . the ui will carlton between two pages .

          M 1 Reply Last reply
          0
          • M Mr .Wu

            @Lorenz @Eeli-K There have only one qml file . Like this :

            import QtQuick 2.7
            import QtQuick.Controls 2.0
            import QtQuick.Layouts 1.0

            ApplicationWindow {
            visible: true
            width: 240
            height: 240
            title: qsTr("Hello World")
            flags: Qt.FramelessWindowHint

            SwipeView {
                id: swipeView
                anchors.fill: parent
                currentIndex: 0
            
                Page {
                    Rectangle
                    {
                        color: "red"
                        anchors.fill: parent
                    }
                }
                Page {
                    Rectangle
                    {
                        color: "yellow"
                        anchors.fill: parent
                    }
                }
                Page {
                    Rectangle
                    {
                        color: "blue"
                        anchors.fill: parent
                    }
                }
                Page {
                    Label {
                        text: qsTr("Second page")
                        anchors.centerIn: parent
                    }
                }
            }
            
            /*
            footer: TabBar {
                id: tabBar
                currentIndex: swipeView.currentIndex
                TabButton {
                    text: qsTr("First")
                }
                TabButton {
                    text: qsTr("Second")
                }
            }
            */
            

            }

            when I running on pc . it's ok . but when i running at arm device . the ui will carlton between two pages .

            M Offline
            M Offline
            Mr .Wu
            wrote on last edited by
            #5

            @Mr-.Wu test result like this

            1 Reply Last reply
            0
            • LorenzL Lorenz

              Hi,

              Can you post a code example?

              Check out this code sample which demonstrates the basic use of a SwipeView. It uses the V-Play SDK, but the concept also applies to standard Qt SwipeViews.

              Best,
              Lorenz

              M Offline
              M Offline
              Mr .Wu
              wrote on last edited by
              #6

              @Lorenz @Eeli-K i have uploaded test video

              E 1 Reply Last reply
              0
              • M Mr .Wu

                @Lorenz @Eeli-K i have uploaded test video

                E Offline
                E Offline
                Eeli K
                wrote on last edited by
                #7

                @Mr-.Wu I can't see the result or video, maybe because of an ad blocker, I can't read Chinese. But your code is good. It's very basic and should work IMO. What kind of arm device do you use?

                M 1 Reply Last reply
                0
                • E Eeli K

                  @Mr-.Wu I can't see the result or video, maybe because of an ad blocker, I can't read Chinese. But your code is good. It's very basic and should work IMO. What kind of arm device do you use?

                  M Offline
                  M Offline
                  Mr .Wu
                  wrote on last edited by
                  #8

                  @Eeli-K said in Swipe View Problem:
                  Can you tell me a network shared space . I upload the test video .

                  Our arm device is : arm v7 . our device has no gpu.

                  E 1 Reply Last reply
                  0
                  • M Mr .Wu

                    @Eeli-K said in Swipe View Problem:
                    Can you tell me a network shared space . I upload the test video .

                    Our arm device is : arm v7 . our device has no gpu.

                    E Offline
                    E Offline
                    Eeli K
                    wrote on last edited by
                    #9

                    @Mr-.Wu Don't bother with the video just for me, it's enough to know that you have some kind of an embedded device. In that case, can you give specifications for it? It probably has some kind of a touch screen, what kind? I don't think I can help, but maybe someone else can. And, by the way, we would have saved time and work if you had given all these details right away in your first post, so please try to be more verbose in the future, it's easier for everyone. (In this case the really important pieces were the description of the problem, the example code, that it works on a normal desktop, and specifications of your device where it doesn't work.)

                    M 1 Reply Last reply
                    0
                    • E Eeli K

                      @Mr-.Wu Don't bother with the video just for me, it's enough to know that you have some kind of an embedded device. In that case, can you give specifications for it? It probably has some kind of a touch screen, what kind? I don't think I can help, but maybe someone else can. And, by the way, we would have saved time and work if you had given all these details right away in your first post, so please try to be more verbose in the future, it's easier for everyone. (In this case the really important pieces were the description of the problem, the example code, that it works on a normal desktop, and specifications of your device where it doesn't work.)

                      M Offline
                      M Offline
                      Mr .Wu
                      wrote on last edited by
                      #10

                      @Eeli-K Our Tp specifications is capacitive screen . the drive ic is FT6x36 . the tp size is 240 * 240

                      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