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. [solved]How to set minimum flickable contentY and how to use Math.max() function?
Forum Updated to NodeBB v4.3 + New Features

[solved]How to set minimum flickable contentY and how to use Math.max() function?

Scheduled Pinned Locked Moved QML and Qt Quick
5 Posts 3 Posters 3.2k 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.
  • D Offline
    D Offline
    daljit97
    wrote on last edited by
    #1

    Hello, I'm working with a flickable in qml and I need that the minimium contentY shoud be 20, I don't know how to do this because flickable doesn't have a onMovementUpdated signal. Another thing, I don't understand how work Math.max() and Math.min() functions.
    Can anyone help?

    1 Reply Last reply
    0
    • P Offline
      P Offline
      Peppy
      wrote on last edited by
      #2

      Math.max() and Math.min() choose from two arguments and return the higher or the lower one.

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

        Thanks, now how to set max or min contentY for a flickable

        1 Reply Last reply
        0
        • M Offline
          M Offline
          mbrasser
          wrote on last edited by
          #4

          Hi,

          Math.min()/Math.max() are standard Javascript functions. The QML documentation doesn't document these at the moment, so your best bet is to refer to existing Javascript documentation, such as http://www.w3schools.com/jsref/jsref_obj_math.asp .

          Can you give more details about what sort of effect you are trying to achieve (and what version of QtQuick you are using)? It may be that it is possible to achieve without setting a minimum contentY. For example, you might try placing your flickable content starting at y position of -20.

          Regards,
          Michael

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

            Thanks, setting up content at y position of -20 works!

            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