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. QT 5.2 - Including / Importing a JavaScript Resource from Another JavaScript Resource is broken since 5.2
Forum Updated to NodeBB v4.3 + New Features

QT 5.2 - Including / Importing a JavaScript Resource from Another JavaScript Resource is broken since 5.2

Scheduled Pinned Locked Moved QML and Qt Quick
9 Posts 3 Posters 2.4k 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
    DerMas
    wrote on last edited by
    #1

    In my qml project I use a.js, b.js and z.js. a.js and b.js use functions of z.js. So I included z.js with the following code in a.js and b.js:

    @Qt.include("z.js")@

    This worked perfectly with QT 5.1, but since I switched to 5.2 it doesnt work anymore. I get the following error:

    @a.js: TypeError: Property 'myExternalFunction' of object [object Object] is not a function@

    I looked at the "Docs":http://qt-project.org/doc/qt-5/qtqml-javascript-imports.html and tried the alternative ".import" code, but this gives me a "Syntax error" in my a.js and b.js.

    Is there any way to fix this? Or is this a new introduced bug that cant be fixed by myself?

    1 Reply Last reply
    0
    • D Offline
      D Offline
      DerMas
      wrote on last edited by
      #2

      Is there no solution to this problem?

      Or does this problem only occur in my project? :)

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

        Weekly push of the day :)

        1 Reply Last reply
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #4

          Hi,

          Did you check the "bug report system":http://bugreports.qt-project.org to see whether it's something known ? If now you could open a report with a minimal compilable example that reproduce the behavior

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

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

            Couldnt find a related issue, so I opened a new bug report with a small example:

            https://bugreports.qt-project.org/browse/QTBUG-36353

            1 Reply Last reply
            0
            • D Offline
              D Offline
              DerMas
              wrote on last edited by
              #6

              I updated the bugreport. Seems to work fine with windows, but error occurs on linux machines. Anyone on linux not having the described problem?

              1 Reply Last reply
              0
              • D Offline
                D Offline
                DerMas
                wrote on last edited by
                #7

                Just an update:
                Problem is fixed with Qt 5.3. Unfortunately the update also breaks other parts of my application, but just wanted to update you guys :)

                1 Reply Last reply
                0
                • L Offline
                  L Offline
                  lack
                  wrote on last edited by
                  #8

                  Can you tell us what breaks now on Qt 5.3? I'm curious

                  1 Reply Last reply
                  0
                  • D Offline
                    D Offline
                    DerMas
                    wrote on last edited by
                    #9

                    See this post:

                    http://qt-project.org/forums/viewthread/42799/

                    Maybe there is more, but I stopped using 5.3 frustrated ^^

                    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