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. QML page transition
Forum Updated to NodeBB v4.3 + New Features

QML page transition

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
3 Posts 2 Posters 292 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.
  • C Offline
    C Offline
    ceydasimsekk
    wrote on last edited by
    #1

    What is the most efficient method of transitioning between QML pages? I did it with the Loader class, but the transition is very slow and inefficient.

    Loader {
    id: dynamicLoader
    anchors.fill: parent
    visible: false
    }
    // Buton
    Rectangle {
    id: startButtonContainer
    width: parent.width * 0.1
    height: 50
    color: "#388E3C"
    radius: 20
    anchors.horizontalCenter: parent.horizontalCenter
    anchors.top: passwordFieldContainer.bottom
    anchors.topMargin: 40
    MouseArea {
    anchors.fill: parent
    onClicked: {
    if(usernameField.text === "" || passwordField.text === ""){
    errorMessage.text = "kullanıcı adı veya şifre boş bırakılamaz!"
    errorMessage.visible = true
    }
    else if (usernameField.text === "cnş" && passwordField.text === "1234") {
    dynamicLoader.source = "qrc:/qml/MainRootWindow.qml"
    dynamicLoader.visible = true
    screen.visible = false
    } else {
    // Hatalı giriş mesajı
    errorMessage.text = "kullanıcı adı veya şifre yanlış!"
    errorMessage.visible = true
    }
    }
    }

    1 Reply Last reply
    0
    • GrecKoG Offline
      GrecKoG Offline
      GrecKo
      Qt Champions 2018
      wrote on last edited by
      #2

      StackView has a better API for changing pages and has support for transitions (custom and default).

      C 1 Reply Last reply
      1
      • GrecKoG GrecKo

        StackView has a better API for changing pages and has support for transitions (custom and default).

        C Offline
        C Offline
        ceydasimsekk
        wrote on last edited by
        #3

        @GrecKo
        Thank you I will try.

        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