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 javascript function parameter typing
Qt 6.11 is out! See what's new in the release blog

qml javascript function parameter typing

Scheduled Pinned Locked Moved Solved QML and Qt Quick
2 Posts 2 Posters 159 Views 2 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.
  • P Offline
    P Offline
    poncho524
    wrote last edited by aha_1980
    #1

    I have a 5.15 application that i need to backport to 5.13.
    5.13 is complaining about specifying types in qml functions.

    for example

    function doSomething(number : int) {
      [...]
    }
    

    looks like 5.13 doesn't like the ": int"

    is there anywhere in the docs that explain when specifying type became acceptable? i can't find it.

    is there anything settable in 5.13 to enable the capability so i don't need to rewrite stuff?

    JKSHJ 1 Reply Last reply
    0
    • P poncho524

      I have a 5.15 application that i need to backport to 5.13.
      5.13 is complaining about specifying types in qml functions.

      for example

      function doSomething(number : int) {
        [...]
      }
      

      looks like 5.13 doesn't like the ": int"

      is there anywhere in the docs that explain when specifying type became acceptable? i can't find it.

      is there anything settable in 5.13 to enable the capability so i don't need to rewrite stuff?

      JKSHJ Offline
      JKSHJ Offline
      JKSH
      Moderators
      wrote last edited by
      #2

      @poncho524 said in qml javascript function parameter typing:

      is there anywhere in the docs that explain when specifying type became acceptable? i can't find it.

      Not the docs, but this blog post says it was introduced in Qt 5.14: https://www.qt.io/blog/compiling-qml-to-c-annotating-javascript-functions

      https://www.qt.io/blog/compiling-qml-to-c-annotating-javascript-functions

      Not that I know of

      Qt Doc Search for browsers: forum.qt.io/topic/35616/web-browser-extension-for-improved-doc-searches

      1 Reply Last reply
      1
      • P poncho524 has marked this topic as solved

      • Login

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