Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Remove property animation
Forum Updated to NodeBB v4.3 + New Features

Remove property animation

Scheduled Pinned Locked Moved Solved General and Desktop
3 Posts 2 Posters 413 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.
  • C Offline
    C Offline
    Circuits
    wrote on last edited by
    #1

    We have decided our current virtualKeyboard does not match up well enough to our number pad and so we want to alter it and or get rid of it all together and replace it. Currently, the only thing stopping me from being able to reuse the current code is this keyboard's property animation. At least, I believe it is the property animation (new to QML and Qt).. basically once you click on the input text box it sort of slides up from the bottom of the screen. I believe that is the property animation that this code is referring too:

    ...
    property alias focusControl: focusControlArea.enabled
        property AbstractInputField target: null
        readonly property bool shown: target !== null
        readonly property real targetYOffset: {
            if (target === null)
                return 0
    
            var globalTargetPos = target.mapToItem(null, 0, target.height)
            var keyboardPanelY = keyboardPanel.height - visiblePanel.height
    
            if(globalTargetPos.y > keyboardPanelY)
                return keyboardPanelY - globalTargetPos.y
            else
                return 0
        }
    
        y: shown ? 0 : height
        z: 1000
        width: parent.width
        height: parent.height
    
        Behavior on y { PropertyAnimation {} }
    
        MouseArea {
            id: focusControlArea
            width: parent.width
            anchors.top: parent.top
            anchors.bottom: visiblePanel.top
            onClicked: target.cancel()
        }
    
        Rectangle {
            id: visiblePanel
            y: parent.height - height
            width: parent.width
            height: styleKeyboardPanel.keyHeight * 4 + styleKeyboardPanel.keySpacing * 3 + styleKeyboardPanel.padding * 2
            color: styleKeyboardPanel.colorBackground
    
            MouseArea {
                anchors.fill: parent
            }
    ...
    

    If I can simply alter this current keyboard s/t it doesn't slide up from the bottom of the screen but instead opens up a window of its own than with enough alteration to the style and format of it I wont have to re-write an entirely new keyboard. Perhaps someone could give me a clue as to how I can go about getting rid of this property animation?

    Gojir4G 1 Reply Last reply
    0
    • C Circuits

      We have decided our current virtualKeyboard does not match up well enough to our number pad and so we want to alter it and or get rid of it all together and replace it. Currently, the only thing stopping me from being able to reuse the current code is this keyboard's property animation. At least, I believe it is the property animation (new to QML and Qt).. basically once you click on the input text box it sort of slides up from the bottom of the screen. I believe that is the property animation that this code is referring too:

      ...
      property alias focusControl: focusControlArea.enabled
          property AbstractInputField target: null
          readonly property bool shown: target !== null
          readonly property real targetYOffset: {
              if (target === null)
                  return 0
      
              var globalTargetPos = target.mapToItem(null, 0, target.height)
              var keyboardPanelY = keyboardPanel.height - visiblePanel.height
      
              if(globalTargetPos.y > keyboardPanelY)
                  return keyboardPanelY - globalTargetPos.y
              else
                  return 0
          }
      
          y: shown ? 0 : height
          z: 1000
          width: parent.width
          height: parent.height
      
          Behavior on y { PropertyAnimation {} }
      
          MouseArea {
              id: focusControlArea
              width: parent.width
              anchors.top: parent.top
              anchors.bottom: visiblePanel.top
              onClicked: target.cancel()
          }
      
          Rectangle {
              id: visiblePanel
              y: parent.height - height
              width: parent.width
              height: styleKeyboardPanel.keyHeight * 4 + styleKeyboardPanel.keySpacing * 3 + styleKeyboardPanel.padding * 2
              color: styleKeyboardPanel.colorBackground
      
              MouseArea {
                  anchors.fill: parent
              }
      ...
      

      If I can simply alter this current keyboard s/t it doesn't slide up from the bottom of the screen but instead opens up a window of its own than with enough alteration to the style and format of it I wont have to re-write an entirely new keyboard. Perhaps someone could give me a clue as to how I can go about getting rid of this property animation?

      Gojir4G Offline
      Gojir4G Offline
      Gojir4
      wrote on last edited by Gojir4
      #2

      @Circuits said in Remove property animation:

      Behavior on y { PropertyAnimation {} }

      Commenting this should remove the animation, basically it says that when ychanges, it is animated from old position to new one, with a duration of 250ms by default.

      C 1 Reply Last reply
      3
      • Gojir4G Gojir4

        @Circuits said in Remove property animation:

        Behavior on y { PropertyAnimation {} }

        Commenting this should remove the animation, basically it says that when ychanges, it is animated from old position to new one, with a duration of 250ms by default.

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

        @Gojir4 Oh my, I was way over complicating this, thank you.

        1 Reply Last reply
        1

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved